View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

Configurar ipf (ipfilter/ipnat) en solaris, equivalente a iptables de linux

Fuentes:


Código:
# cp /dev/tty test.ipnat
map rtls0 from any to 3.0.1.170 port = 502 -> 0/32
rdr rtls0 3.0.1.170 port 502 -> 3.0.1.170 port 504 tcp
# ipnat -l
ioctl(SIOCGNATS): I/O error
# uname -a
SunOS arganzuela 5.10 Generic_127112-11 i86pc i386 i86pc
#  svcs -a | grep forward
disabled        9:25:13 svc:/network/ipv6-forwarding:default
disabled        9:25:13 svc:/network/ipv4-forwarding:default
# ifconfig rtls0 router
# ndd -set /dev/ip ip_forwarding 1
# routeadm -e ipv4-forwarding
# svcadm enable network/ipv4-forwarding
# svcs -a | grep forward
disabled        9:25:13 svc:/network/ipv6-forwarding:default
online          9:42:43 svc:/network/ipv4-forwarding:default
# svcadm enable ipfilter
#  ipnat -l
List of active MAP/Redirect filters:

List of active sessions:
# ipnat -CF -f test.ipnat
0 entries flushed from NAT table
0 entries flushed from NAT list
# ipnat -l   
List of active MAP/Redirect filters:
map rtls0 from any to 3.0.1.170/32 port = 502 -> 0.0.0.0/32
rdr rtls0 3.0.1.170/32 port 502 -> 3.0.1.170 port 504 tcp

List of active sessions:
#