Mar 13

วันนี้มาลอง Compile Kernel ของ FreeBSD 7.0 กัน ตามนี้เลย
[code lang='bash']
cd /usr/src/sys/i386/conf
cp GENERIC IPFWKERN
[/code]
## edit IPFWKERN ##
เพิ่ม
[code lang='bash']
options IPFIREWALL
options IPDIVERT
options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=100
options IPFIREWALL_FORWARD
options IPSTEALTH
options ACCEPT_FILTER_HTTP
options ACCEPT_FILTER_DATA
[/code]
หลังจากเสร็จแล้ว
[code lang='bash']
config IPFWKERN
cd /usr/src
make kernel KERNCONF=IPFWKERN
make installkernel KERNCONF=IPFWKERN
[/code]
หลังจากนั้น แก้ /etc/rc.conf เพิ่ม
[code lang='bash']
firewall_enable="YES"
firewall_type="/etc/ipfw.rules"
filewall_logging="YES"
[/code]
แล้วอย่าลืมสร้าง ipfw.rules ล่ะครับ
หลังจากนั้นก็ Reboot เป็นอันเสร็จเรียบร้อย

Tagged with:
preload preload preload