Re: [問題] NAT Port Forwarding有錯誤

看板FreeBSD作者時間17年前 (2008/03/15 00:09), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/6 (看更多)
※ 引述《kevinblue.bbs@bbs.sayya.org (FreeBSD傷腦中)》之銘言: : ※ 引述《uftea.bbs@ptt.cc (可愛茶)》之銘言: : > 題外話.. 我建議使用 pf .. 可以作的事更多.. : > 如果是使用 pf 的話.. config 如下.. : > # 原本的 NAT : > nat on de0 from 192.168.112.0/24 to any -> 140.115.208.168/32 : > # Portmapping : > rdr on de0 proto tcp from any to 140.115.208.168/32 port 3389 -> (接下面) : > 192.168.112.168 port 3389 : 別忘了(以下執行權限為 root) : %> echo "gateway_enable=\"YES\"" >> /etc/rc.conf : %> kldload pf : 啟動 pf : 1. %> /etc/rc.d/pf start : 2. %> pfctl -e : 關閉 pf : 1. %> /etc/rc.d/pf stop : 2. %> pfctl -d : 如果 /etc/rc.d/pf restart 會讓遠端連線斷線 : 可以試試 : %> pfctl -de : reference : http://www.openbsd.org/faq/pf/nat.html : http://cavanantha.wordpress.com/2007/09/16/nat-on-freebsd-using-pf/ 我自己用pf都是 pfctl -f xxx.conf 就會使用新的設定了 不需要 pfctl -d ; pfctl -e 提供給大家參考 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.80.34.170
文章代碼(AID): #17sgCxPU (FreeBSD)
文章代碼(AID): #17sgCxPU (FreeBSD)