problem in configuring iptables as NAT device
Pl. look at schematic attached.
As shown, Linux box is between Our Private Network & Router(which is connected to internet with leased line).I have installed Red Hat Linux 9 with IP tables. Static IP are assigned to outside interface card of Linux(203.199.128.169) & Interfaces of the Cisco Router.Private IPs are in range of 192.168.2.0.
We have used the following commands in terminal:
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 \-j SNAT -o eth1 --to-source 203.199.128.169
OR
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables FORWARD -t filter -i eth1 -m state \--state NEW,ESTABLISHED,RELATED -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
There were no errors when I executed above commands.
When I access internet through linux box, I am able to browse but NAT is done at router. If I remove NAT commands from router, I cannot access internet through linux box.
Could u please let me know my mistake?
regards,
shashi
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com