|
发表于 2004-11-19 01:49:42
|
显示全部楼层
Don't use cut-and-paste blindly!!!
<quote>
老大,你这两句话都有错
误
.[root@serveroutside root]# /sbin/iptables -t nat -A PREROUTING -d 202.114.12.21 -p tcp --destination --port 80 -j DNAT --to-destinaton 192.168.0.2
iptables v1.2.7a: multiple -d flags not allowed
Try `iptables -h' or 'iptables --help' for more information.
</quote>
Should be "--destination-port 80" instead of "--destination --port 80", or "--dport 80". There is only a single "-" between "destination" and "port"
<quote>
[root@serveroutside root]# /sbin/iptables -t nat -A OUTPUT-s 192.168.0.2 -p tcp --source-port 80 -j SNAT --to-source 202.114.12.21
Bad argument `192.168.0.2'
Try `iptables -h' or 'iptables --help' for more information.
[root@serveroutside root]#
</quote>
Should be "-A OUTPUT -s 192.168.0.2" instead of "-A OUTPUT-s 192.168.0.2". There is a space character between "OUTPUT" and "-s".
If you don't understand the syntax, don't just use cut and past blindly!!!
Please also note that for ftp service, there are two modes, for active mode, you also need open tcp port 20, for passive ftp mode, you need open a higher tcp port (>1024).
A random observer. |
|