IPNAT+Ipfilter 超級防火牆調校

2009-05-13 13:09:34来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

Description :

今天在網路上看到有人受到 Worm 的攻擊,而使 firewall 垮了,發現大家解決方式就是調校 firewall ,真是不經一事不長一智,原來 firewall 是可調校,看了ipfilter how to 之後終於找到了調校方式,不過要注意的是調校過後的 firewall 並不就是刀槍不入,只是調校後的 firewall 面對攻擊承受力提高,畢竟世上沒有完美的事物。
Setp 1.
查看原本系統sysctl值  # sysctl -a | grep net.inet.ipf
net.inet.ipf.fr_flags: 0
net.inet.ipf.fr_pass: 514
net.inet.ipf.fr_active: 0
net.inet.ipf.fr_tcpidletimeout: 864000
net.inet.ipf.fr_tcpclosewait: 480
net.inet.ipf.fr_tcplastack: 480
net.inet.ipf.fr_tcptimeout: 480
net.inet.ipf.fr_tcpclosed: 120
net.inet.ipf.fr_tcphalfclosed: 14400
net.inet.ipf.fr_udptimeout: 240
net.inet.ipf.fr_udpacktimeout: 24
net.inet.ipf.fr_icmptimeout: 120
net.inet.ipf.fr_icmpacktimeout: 12
net.inet.ipf.fr_defnatage: 1200
net.inet.ipf.fr_ipfrttl: 120
net.inet.ipf.ipl_unreach: 13
net.inet.ipf.fr_running: 1
net.inet.ipf.fr_authsize: 32
net.inet.ipf.fr_authused: 0
net.inet.ipf.fr_defaultauthage: 600
net.inet.ipf.fr_chksrc: 0
net.inet.ipf.ippr_ftp_pasvonly: 0
net.inet.ipf.fr_minttl: 3
net.inet.ipf.fr_minttllog: 1
Setp 2.
使用手動更改  #sysctl net.inet.ipf.fr_tcpclosed=1
net.inet.ipf.fr_tcpclosed: 120 ->1
Setp 3.
加入開機自動更新  #vi /etc/sysctl.conf  內容如下:
net.inet.ipf.fr_flags=0net.inet.ipf.fr_pass=514net.inet.ipf.fr_active=0net.inet.ipf.fr_tcpidletimeout=864000net.inet.ipf.fr_tcpclosewait=60net.inet.ipf.fr_tcplastack=20net.inet.ipf.fr_tcptimeout=120net.inet.ipf.fr_tcpclosed=1net.inet.ipf.fr_udptimeout=120net.inet.ipf.fr_icmptimeout=120net.inet.ipf.fr_defnatage=1200net.inet.ipf.fr_ipfrttl=120net.inet.ipf.ipl_unreach=13net.inet.ipf.ipl_inited=1net.inet.ipf.fr_authsize=32net.inet.ipf.fr_authused=0net.inet.ipf.fr_defaultauthage=600


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_521498.html

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FreeBSD 5.3 Release PF 初體驗

下一篇:freebsd下建立dns服务器