1. cd /usr/src/sys/i386/conf/
vi GENERAL
add
options IPFIREWALL # enables IPFW options IPFIREWALL_VERBOSE # enables logging for rules with log keyword options IPFIREWALL_VERBOSE_LIMIT=5 # limits number of logged packets per-entry options IPFIREWALL_DEFAULT_TO_ACCEPT # sets default policy to pass what is not explicitly denied options IPDIVERT # enables NAT
and add
options BRIDGE
#conf GENERAL
#cd ../../compile/GENERAL
#make depend && make && make install
#reboot
enable bridge :
At this point, to enable the bridge, you have to execute the following commands (having the shrewdness to replace the names of the two network interfaces fxp0and xl0 with your own ones):
#sysctl net.link.ether.bridge_cfg=fxp0:0,xl0:0#sysctl net.link.ether.bridge.ipfw=1#sysctl net.link.ether.bridge=1
reference :http://www.freebsd.org/doc/en/articles/filtering-bridges/article.html
文章標籤
全站熱搜
