因為原本使用的 adsl 還沒退掉, 所以目前家裡有兩條 ADSL. 早上參考 thinker 的文章: “固定的 ADSL 連線”, 設定了一下 PPPoE, 很快就連線成功了.
測試之後, 發現只有其原有的IP上的 service 可以正常運作, 猜想應該是 routing 的問題, 但是一下子沒想到要怎麼解決, 又趕著要去上班, 只好先加 routing rule 到幾個常用的 server, 順便測試上下行的速度. 後來在channel 裡問了一下, 白長輩提供了過去 DK大神 在 386bsd 發表的文章, 裡面提到了用 ipfw fwd 來做 policy routing, 回家之後一試….不 work T_T 就在我用 google 找了大約半小時後, 突然想到 man page 裡提到的一段:
To enable fwd a custom kernel needs to be compiled with the
option options IPFIREWALL_FORWARD. With the additional option
options IPFIREWALL_FORWARD_EXTENDED all safeguards are removed
and it also makes it possible to redirect packets destined to
locally configured IP addresses. Please note that such rules
apply to locally generated packets as well and great care is
required to ensure proper behaviour for automatically generated
packets like ICMP message size exceeded and others.
是的..我少加了 options IPFIREWALL_FORWARD_EXTENDED … orz 這個 options 是 5.4-RELEASE 後才新增的, 如此才有 support policy routing (ref: 5.4 Release Note 加上之後 reboot , 果然一切順利, 總算是解決了這個問題 orz 以後要記得先 man 啊 T_T
太硬了 -_-”