将PF语法从OpenBSD 4.4转换为5.5:“rdr on”,“no nat on”,“nat on”

时间:2014-07-02 17:01:47

标签: networking syntax firewall nat openbsd

如何将以下PF语法从OpenBSD 4.4转换为OpenBSD 5.5?

rdr on $IF_LAN proto tcp from $LAN to $IP_WAN port http -> $WEB_SERV
no nat on $IF_LAN proto tcp from $IF_LAN to $LAN
nat on $IF_LAN proto tcp from $LAN to $WEB_SERV port http -> $IP_LAN

1 个答案:

答案 0 :(得分:0)

使用传入rdr-to并传递给nat-to

pass in on $IF_LAN proto tcp from $LAN to $IP_WAN port http rdr-to $WEB_SERV
pass out on $IF_LAN proto tcp from $LAN to $WEB_SERV port http nat-to $IP_LAN

没有nat似乎是关于设计的问题