how to actibe iptables NAT?

flintlong flintlong@sina.com
Thu, 21 Jun 2001 12:28:18 +0800


I had build the iptables nat into my kernel in redhat 7.1 , and I wanna use the NAT to let internet user (192.168.1.1) can come into my WWW_server (128.0.2.38 in intranet and 192.168.1.38 as true IP address provided by ISP) by NAT , so i use the command :

/sbin/iptables -t nat -A PREROUTING -i eth0 -d 192.168.1.38 -j DNAT --to 128.0.2.38

but I cannot visit the www_server in 192.168.1.1 ?

so , should i do something before I used the command, just like I should use the command :
 echo 1 > /proc/sys/net/ipv4/ip_forward
to turn on IP forwarding
  thx for any help 

______________________________________

===================================================================
新浪免费电子邮箱 (http://mail.sina.com.cn)
订阅手机短信头条新闻,天天奖多款时尚手机! (http://dailynews.sina.com.cn/c/272235.html)
订阅手机短信顶级新闻每天得新款手机大奖! (http://dailynews.sina.com.cn/c/266499.html)