当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > FreeBSD4.8 IPFW How to

Unix/Linux
PostgreSQL Hardware Performance Tuning
Firefox 1.0.6简体中文版发布,提供下载
包过滤防火墙配置实例.
linux中的时间流
Rsync Server +Rsync client 配置完全实践笔记
mysql数据库root口令忘记自动恢复脚本
自动修改linux下的网卡ip和掩码脚本
将指定文件列表中的文件内容逐个替换成想要的内容的小脚本
用nmap扫描端口并写到一个静态网页脚本(转贴)
配置xdm远程连接
解决如何修改mysql服务器监听端口的问题。
CC2001关于计算机科学的教学大纲
Linux命令Man解释:losetup:设定与控制loopdevices
Linux网管123---第6章.一般系统管理问题-2.建立使用者帐号
汉化你的RedHat全攻略(4)-FAQ和一些总结
"/dev/tty0"不见了怎麽救回来?
/dev下cua*被删除,该如何恢复?
Linux网管123---第7章.自订的组态及管理内容-1.HTTP
vi介绍编(2)参数简介
Linux命令Man解释:mkfs:建立linux文件系统

Unix/Linux 中的 FreeBSD4.8 IPFW How to


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 48 ::
收藏到网摘: n/a

FreeBSD4.8 IPFW How to
测试机IP为211.162.77.73 网卡为:xl0 内核中加了流量管理,你可以根据实际需要增删。 uname -a 如果你用的是默认内核GENERIC则如下操作: ============================================= cd /sys/i386/conf cp GENERIC ./GENERIC_IPFW --------------------------------- ee GENERIC_IPFW 添加以下内容 options IPFIREWALL options IPDIVERT options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=100 options IPSTEALTH options ACCEPT_FILTER_DATA options ACCEPT_FILTER_HTTP options ICMP_BANDLIM options DUMMYNET --------------------------------- config ./GENERIC_IPFW cd ../../compile/GENERIC_IPFW make depend all install --------------------------------- ee /etc/rc.conf 添加以下内容 ##########IP-firewall################# firewall_enable="YES" firewall_script="/etc/rc.firewall" firewall_type="/etc/ipfw.conf" firewall_quiet="YES" firewall_logging_enable="YES" --------------------------------- ee /etc/syslog.conf 添加以下内容 !ipfw *.* /var/log/ipfw.log --------------------------------- ee /etc/ipfw.conf 添加以下内容 add 00001 deny log ip from any to any ipopt rr add 00002 deny log ip from any to any ipopt ts add 00003 deny log ip from any to any ipopt ssrr add 00004 deny log ip from any to any ipopt lsrr add 00005 deny tcp from any to any in tcpflags syn,fin #######tcp######### add 10000 allow tcp from 211.162.77.77 to 211.162.77.73 22 in add 10001 allow tcp from any to 211.162.77.73 21,25,80,110,3306,5999 in add 19997 check-state add 19998 allow tcp from any to any out keep-state setup add 19999 allow tcp from any to any out ######udp########## add 20001 allow udp from any 53 to me in recv xl0 add 20002 allow udp from any to 211.162.77.73 53 in recv xl0 add 29999 allow udp from any to any out ######icmp######### add 30000 allow icmp from any to any icmptypes 3,4 add 30001 allow icmp from any to any icmptypes 8 out add 30002 allow icmp from any to any icmptypes 0,11 in