Newsgroups: comp.unix.solaris
From: spacegoose <spacego...@gmail.com>
Date: Wed, 5 Mar 2008 11:11:48 -0800 (PST)
Local: Wed, Mar 5 2008 2:11 pm
Subject: Re: Networking in Zones
On Mar 5, 11:15 am, "Daniel Rock" <v200...@deadcafe.de> wrote:
> spacegoose <spacego...@gmail.com> wrote: Wow - this seems to work! I already had an interface in the global > > I have an 08/07 Sol 10 x86 machine with 1 physical NIC and1 IP > > address. > > I have 3 sparse zones with the IPs 192.168.0.10, 192.168.0.20, and > 1. The global zone must also have an address in your private subnet. > 2. You have to create a fake default route out of your private subnet > I use names for the following examples: > fakerouter dummy IP address of a fake default router in > They could look line > 172.16.1.254 fakerouter > The network interface in the following examples will be "bge0". Set > (1) setup the global zone. The script should start before starting zones. > #!/sbin/sh > routerip=`netstat -rn | awk '/default/ { print $2 }'` > This script will get the MAC address of the default router, create a static > Change variable names as required. > You will see two default routes in your global zones, but don't worry - that's > (2) setup ipfilter/ipnat > ipf.conf should contain at least the following rules so private addresses > block out quick on bge0 from any to 10.0.0.0/8 > block in quick on bge0 from 10.0.0.0/8 to any > In ipnat.conf you can use the usual redirect rules. Say, zone1 contains a > rdr bge0 0/0 port smtp -> zone1 port smtp tcp age 120 > And for outgoing traffic > map bge0 172.16.0.0/12 -> 0 age 120 > ("age 120" is (was?) needed because of a ipfilter bug introduced in S10U4) > -- zone on the same subnet as the zones (so I could ping them). I halted a zone, ran the script* and was able to SSH into the redzone on port 2222 from a completely different machine. By the way in your ipnat you refer to zone1 will the name instead of IP address, does this work? I did not modify my ipf or ipnat .confs for now, as they were already in place, I will consider rules to prevent IP address leaking though. *I did receive an error on running the script, but enough of it seems ifconfig: setifflags: SIOCSLIFFLAGS: elxl0:2: Cannot assign requested # zoneadm -z redzone halt I did see two default gateways as you said I would. And redzone could Do you know if this is a workaround to what the Exclusive-IP zones do Is this as effective? Any drawbacks to this? Thanks, You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||