Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleExample:
$ sudo dladm create-etherstub stub2
$ sudo dladm create-vnic -l stub2 vz1 # for global zone and will be using as gateway for zones with exclusive interface
$ sudo ipadm create-addr -T static -a 192.168.0.1/24 vz1/v4stat # static address for gateway for zones
$ sudo dladm create-vnic -l stub2 vz2 # for zone - look it, save mac address for exclusive ip-type and remove it
$ sudo routeadm -u -e ipv4-forwarding # enable port forwarding
$ sudo ndd -get /dev/tcp ip_forwarding # check it - it should be 1

 


root@myhost:/etc/ipf# cat ipnat.conf 

...

if need rule for access to 22 port to zone IP we can add

rdr vmxnet3s0 0/0 port 22222 2222 -> 192.168.2.2 port 22 


if will add access to zone 192.168.2.2:22 from external IP:2222

 


svcadm enable ipfilter 


reference: http://www.scalingbits.com/book/export/html/479