|
|
服务器 eth0:202.204.*.*
eth1:192.168.199.1
客户机地址为:192.168.199.*
服务器运行下面两条命令做代理:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.199.0/24 -j MASQUERADE
运行下面的命令把3721端口影射到:
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 3721 -j DNAT --to-destination 192.168.199.125:21
iptables -t nat -A POSTROUTING -s 192.168.199.0/24 -d 192.168.199.125 -p tcp -m tcp --dport 3721 -j SNAT --to-source 192.168.199.1
在内网机器:192.168.199.125上用serv-U v5.0.0.4架设ftp服务器
问题:
1,不能使用pasv模式
2,关闭pasv之后,在公网上的机器访问正常,但别的内网的机器[通过代理上网的机器]无法访问:
200 PORT Command successful.
LIST
150 Opening ASCII mode data connection for /bin/ls.
426 Data connection closed, transfer aborted.
请问如何解决? |
|