Chinaunix首页 | 论坛 | 博客
  • 博客访问: 17070
  • 博文数量: 3
  • 博客积分: 80
  • 博客等级: 民兵
  • 技术积分: 40
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-22 00:16
文章分类
文章存档

2011年(1)

2008年(2)

我的朋友

分类: BSD

2008-07-22 00:20:43

openbsd+PF+NAT多网卡配置方案
 
 
ext_if="vic0"
int_if="{vic1,vic2}"
#int_if="vic2"
#int_if1="10.10.10.0/16"
#int_if2="172.168.254.0/24"
lan_net="{10.10.10.0/16, 172.168.254.0/24}"
#lan_net="172.168.254.0/24"
ftp_port="{21,2201,20021}"
server="{53,80}"
#table persist
set skip on lo
scrub in
#nat-anchor "ftp-proxy/*"
#rdr-anchor "ftp-proxy/*"
#rdr-anchor "relayd/*"
#nat on $ext_if from !($ext_if) ->127.0.0.1 port 8021
nat on vic0 from 10.10.10.0/16 to any -> vic0
nat on vic0 from 172.168.254.0/24 to any -> vic0
#nat on $ext_if from !($ext_if) -> ($ext_if:0)
#rdr pass on $int_if proto tcp to port ftp -> 127.0.0.1 port 8021
#no rdr on $ext_if proto tcp from to any port smtp
#rdr pass on $ext_if proto tcp from any to any port smtp \
#       -> 127.0.0.1 port spamd
anchor "ftp-proxy/*"
block in
pass quick on $int_if
pass in on $ext_if proto tcp to ($ext_if) port ssh keep state
pass out keep state
#pass out
#pass quick on $int_if no state
#antispoof quick for { lo $int_if }
#pass in on $ext_if proto icmp to ($ext_if)
#pass in on $ext_if proto tcp to ($ext_if) port ssh
#pass in log on $ext_if proto tcp to ($ext_if) port smtp
#pass out log on $ext_if proto tcp from ($ext_if) to port smtp
~
阅读(1863) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:重新编译OpenBSD内核

给主人留下些什么吧!~~