pkantamala
12-25-2001, 10:12 PM
I would like create static NAT (internal network: 192.168.0.2/16 -> External network: 203.130.130.202/29) by using IPTABLES on Linux -kernel 2.4. I used scripts below:
#Echo 1 > /proc/sys/net/ipv4/ip_forward
#iptables - - table nat - - append POSTROUTING - - source 192.168.0.2 - - destination 0.0.0.0/0.0.0.0 - - jump SNAT - - to -source 203.130.130.202
#iptables - - table nat - - append PREROUTING - - source 0.0.0.0/0.0.0.0 - - destination 203.130.130.202 - - jump DNAT - - to –destination 192.168.0.2
After I run the scripts file, I used ping on outside computer to test request and reply packet.
ping – t 203.130.130.202
I can not get a reply packet from 203.130.130.202/29, but I can get replay packet from www:192.168.0.2/16.
How to create static follow the picture above ?
Thank you
Mr.Panupong Kantamala
Bangkok, Thailand.
pkantamala@hotmail.com ËĂ×Í pkantamala@yahoo.com
#Echo 1 > /proc/sys/net/ipv4/ip_forward
#iptables - - table nat - - append POSTROUTING - - source 192.168.0.2 - - destination 0.0.0.0/0.0.0.0 - - jump SNAT - - to -source 203.130.130.202
#iptables - - table nat - - append PREROUTING - - source 0.0.0.0/0.0.0.0 - - destination 203.130.130.202 - - jump DNAT - - to –destination 192.168.0.2
After I run the scripts file, I used ping on outside computer to test request and reply packet.
ping – t 203.130.130.202
I can not get a reply packet from 203.130.130.202/29, but I can get replay packet from www:192.168.0.2/16.
How to create static follow the picture above ?
Thank you
Mr.Panupong Kantamala
Bangkok, Thailand.
pkantamala@hotmail.com ËĂ×Í pkantamala@yahoo.com