免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2224 | 回复: 0

[FreeBSD] pf语法rdr ftp这几句能怎样简化下? [复制链接]

论坛徽章:
0
发表于 2009-07-02 02:24 |显示全部楼层
外网动态IP映射FTP,PASV端口20001-20999

##FTP Server 1
rdr on $ext_if proto tcp from any to $ext_if port 10521 -> 192.168.0.101 port 21
rdr on $ext_if proto tcp from any to $ext_if port 10520 -> 192.168.0.101 port 8021
rdr on $ext_if proto tcp from any to $ext_if port 20001:20999 -> 192.168.0.101 port 20001:20999

##FTP Server 2
rdr on $ext_if proto tcp from any to $ext_if port 20521 -> 192.168.0.102 port 21
rdr on $ext_if proto tcp from any to $ext_if port 20520 -> 192.168.0.102 port 8021
rdr on $ext_if proto tcp from any to $ext_if port 30001:30999 -> 192.168.0.102 port 30001:30999

##FTP Server 3
rdr on $ext_if proto tcp from any to $ext_if port 30521 -> 192.168.0.103 port 21
rdr on $ext_if proto tcp from any to $ext_if port 30520 -> 192.168.0.103 port 8021
rdr on $ext_if proto tcp from any to $ext_if port 40001:40999 -> 192.168.0.103 port 40001:40999

pass in quick on $ext_if proto tcp from any to any port {21,8021,20001:20999,30001:30999,40001:40999} keep state

[ 本帖最后由 qq830406 于 2009-7-2 02:31 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP