由 麻仓叶 在 10-12-2004 22:17 发表:
急问,外网的机器连内网的FTP,连上了,但是不能执行ls那些命令,无法建立数据socket
先用了这个iptables -t nat -A PREROUTING -i eth0 -p tcp -d $FW_IP --dport 21 -j DNAT --to-destination 172.16.255.2:21
iptables -t nat -A PREROUTING -i eth0 -p tcp -d $FW_IP --dport 20 -j DNAT --to-destination 172.16.255.2:20
是不是还要加条外出的路由
由 Snoopy 在 10-13-2004 01:04 发表:
20端口还需要一条对外的,久前用过,现在iptables规则有点忘忘,
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 麻仓叶 在 10-16-2004 11:33 发表:
ding
由 faint 在 10-16-2004 14:31 发表:
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 21 -j DNAT --to 172.16.255.2:21
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp -d $FW_IP --dport 21 -j DNAT --to 172.16.255.2:21
iptables -A FORWARD -p tcp -d 172.16.255.2 --dport 21 -m state --state NEW -j ACCEPT
iptables -t nat -A POSTROUTING -s 172.16.255.0/24 -d 172.16.255.2 -p tcp -m tcp --dpor