交大研究所宿舍
Posted on November 10, 2006 | 1 minutes | 1 words | appleboy
系統預設是不能使用 ipfw 指令,因為系統核心不支援,要使系統支援 ipfw,則需要修改核心
cd /usr/src/sys/i386/conf
vi GENERIC
#在最後面加入
options IPFIREWALL
options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=10
options IPDIVERT
#然後存檔
config GENERIC
cd ../compile/GENERIC/
make cleandepend; make depend;
make depend all install
編譯好沒有錯誤之後,就可以重新開機 ipfw list 65535 allow ip from any to any 看到上面訊息,就是成功 我在自己的論壇寫過一遍
http://www.forum.wu-boy.com/t=10210
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipfw.html
http://freebsd.lab.mlc.edu.tw/natd/
1. cd /usr/ports && make fetchindex 2. portsdb -uU 3. rm -f /var/db/pkg/pkgdb.db 4. pkgdb -Fu 5. cd /usr/src ; make buildworld; make kernel; make installworld; reboot— 這招很好用 上面步驟如果只需要更新ports tree 只需要 cd /usr/ports && make fetchindex 就可以了
其實安裝方面並不難 FreeBSD 就用ports安裝 fc系列 就用 yum 或者是 apt FreeBSD: /usr/ports/net-mgmt/net-snmp /usr/ports/net-mgmt/mrtg http://phorum.study-area.org/viewtopic.php?t=21142&highlight=public+cfgmaker 我找到的資料 ~ 照上面修改大致上ok