由 silver810212 在 05-12-2004 10:38 发表:
内网架ftp服务器的问题
服务器 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.
请问如何解决?
生命不息,学习不止!
你帮助我,我也帮助你。
由 x11 在 05-12-2004 11:22 发表:
内网还要通过公网ip访问?好像多此一举吧
由 silver810212 在 05-12-2