Linux 版 (精华区)

发信人: mxmgy (MXM), 信区: Linux
标  题: 再写个用IPFW过滤收费IP的吧
发信站: 哈工大紫丁香 (Fri Apr 22 11:42:30 2005), 转信

以前用的是这个 比较傻瓜 但是如果不应用在很苛刻的条件下
使用起来也很方便

编译内核 填加
options         IPFIREWALL
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_VERBOSE_LIMIT=100
options         IPDIVERT

创建一个规则/etc/ipfw.rule填加
add allow ip from any to 172.16.0.0/16
add allow ip from any to 58.24.0.0/15
。。。。。。。。
。。。。。。。。
{总感觉这部分规则可以写的更简单 但是没时间看说明了 凑合吧 哈哈}


编辑/etc/rc.conf填加
firewall_enable="YES"
firewall_script="/etc/rc.firewall"
firewall_type="/etc/ipfw.rules"
firewall_quiet="YES"
firewall_logging_enable="YES"

ok 完事 重新启动系统 过滤完成


--
   Linux is for people who hate Windows
     BSD is for people who love UNIX

      Myweb      http://172.16.6.8
 FreeBSD Mirror  http://172.16.6.8/cvsupmirror/
      cvsup      172.16.6.8 


※ 修改:·mxmgy 于 Apr 22 11:44:02 修改本文·[FROM: 172.16.6.98]
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 172.16.6.98]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.748毫秒