Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up IP forwarding on my Nexenta box:

root@hdd:~# uname -a
SunOS hdd 5.11 NexentaOS_134f i86pc i386 i86pc Solaris

The box has 2 network interfaces:

root@hdd:~# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
    inet netmask ff000000
e1000g1: flags=1001100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4,FIXEDMTU> mtu 1500 index 2
    inet netmask ffffff00 broadcast
    ether 68:5:ca:9:51:b8
myri10ge0: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu 9000 index 3
    inet netmask ffffff00 broadcast
    ether 0:60:dd:47:87:2
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
    inet6 ::1/128 is my normal LAN with being the firewall/gateway is a separate LAN for iSCSI (with no internet access)

I want to set up IP forwarding so that a computer on will be able to access the internet by using as a gateway (I don't need any port forwarding)

I have turned on IP forwarding:

root@hdd:~# routeadm
          Configuration   Current              Current
                 Option   Configuration        System State
           IPv4 routing   disabled             disabled
           IPv6 routing   disabled             disabled
        IPv4 forwarding   enabled              enabled
        IPv6 forwarding   disabled             disabled

       Routing services   "route:default ripng:default"

Routing daemons:

                  STATE   FMRI
               disabled   svc:/network/routing/rdisc:default
               disabled   svc:/network/routing/route:default
               disabled   svc:/network/routing/legacy-routing:ipv4
               disabled   svc:/network/routing/legacy-routing:ipv6
               disabled   svc:/network/routing/ripng:default
                 online   svc:/network/routing/ndp:default

But when I dry to start ipnat, I get an error:

root@hdd:~# ipnat -CF -f /etc/ipf/ipnat.conf
ioctl(SIOCGNATS): I/O error

Here is the config:

root@hdd:~# cat /etc/ipf/ipnat.conf
#!/sbin/ipnat -f -
map e1000g1 ->

So the question is how to fix this.. Thanks in advance!

share|improve this question
Please try this, then run ipnat again. svcadm enable network/ipfilter – user142790 Oct 30 '12 at 2:41
Derek, There is a problem with my current config. I can browse Internet using my Nexenta box as a gateway, but any uploads stall within a few sec or just fail. I have tried (download works but upload shows something crazy like 0.05 Mb/s). Also sftp uploads fail. But I can ssh into a remote host or browse sftp servers folders or download stuff. I have tried changing MTU of network to 1500 with no luck. Also added tried to modify ipnat.conf: map e1000g1 -> 0/32 portmap tcp/udp auto map e1000g1 -> 0/32 Any ideas? – Gleb Nov 1 '12 at 1:44

Running svcadm enable ipfilter solved the problem. Thanks Derek G

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.