请教一下如果在内网要做两个FTP服务器对外,代理用IPTABLES如何实现?

由 zhf6440 在 09-20-2004 23:24 发表:

请教一下如果在内网要做两个FTP服务器对外,代理用IPTABLES如何实现?

按照常理,FTP有两个端口,20是它默认的数据端口。

如果我设定FTP1端口为21,FTP2端口为2121

FTP1比较容易搞定,用IPTABLES设定一下就可以了,但是FTP2的那个数据端口怎么办?如果还是默认的20端口,岂不是跟FTP1冲突,内网应该可以连上这个FTP2,外网就不行了。

希望高手指点,谢谢~~~


由 zhf6440 在 09-22-2004 13:32 发表:


请大家帮忙~~~


由 likeawd 在 09-22-2004 23:04 发表:


好像开个端口映射


由 faint 在 09-23-2004 04:46 发表:


modprobe ip_conntrack_ftp ports=21,2121

modprobe ip_nat_ftp ports=21,2121

#多个端口用逗号分开

#这个2121端口不是“转接进来”,而是SNAT“出去”时作的转接。


由 zhf6440 在 10-06-2004 18:42 发表:


我按照faint 说的做了,但还是不行,21端口正常,2121内网正常,外网连入就不行


由 li-jiahuan0 在 10-06-2004 20:40 发表:

监听端口

在ftp2的配置文件里加入

listen_port=10000

10000可以是你想要的端口

用法

ftp ip 端口


面包会有的,女人也会有的


由 Snoopy 在 10-06-2004 21:49 发表:


> quote: > > * * * > > 最初由 zhf6440 发表
>
> 我按照faint 说的做了,但还是不行,21端口正常,2121内网正常,外网连入就不行 > > * * *

再用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


由 faint 在 10-07-2004 02:41 发表:


> quote: > > * * * > > 最初由

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus