第一步: 編輯 kernel,在最後方加入支援 IP firewall 的設定。
#IPFW FireWall
options IPFIREWALL #開啟基本的封包過濾功能
options IPFIREWALL_DEFAULT_TO_ACCEPT #設定 IPFIREWALL 的例外狀況
options IPFIREWALL_VERBOSE #設定記錄過濾日誌
options IPFIREWALL_VERBOSE_LIMIT=100 #設定日誌記錄檔大小的限制
options IPDIVERT #IP firewall 與 natd 的 port 定義, NAT 必要
options IPFIREWALL_FORWARD #子網域封包的傳輸轉遞
options DUMMYNET #IP firewall 限制頻寬設定必要選項
然後重新編譯 kernel 檔。
From:http://redeyeberg.blogspot.com/2007/02/nat-firewall.html
最近迴響