码迷,mamicode.com
首页 > 其他好文 > 详细

FreeBSD_11-系统管理——{Part_8-IPFW}

时间:2016-11-20 06:15:02      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:color   执行   配置文件   指定   freebsd   动态   脚本   keyword   firewall   

内核支持

  • 方式一:静态編译进内核
  • options    IPFIREWALL                    # enables IPFW
    options    IPFIREWALL_VERBOSE            # enables logging for rules with log keyword
    options    IPFIREWALL_VERBOSE_LIMIT=5    # limits number of logged packets per-entry
    options    IPFIREWALL_DEFAULT_TO_ACCEPT  # sets default policy to pass what is not explicitly denied
    options    IPDIVERT                      # enables NAT
  • 方式二:动态装载模块
  • # /boot/loader.conf
        ipfw_load="YES"
        ipfw_nat_load="YES"

配置文件

# /etc/rc.conf[.local]
  firewall_enable="YES"   firewall_logging="YES"
  # 如下两条二选一
  firewall_type="/PATH/TO/RULE_FILE" #指定包含自定义配置规则的文件
  firewall_script="/PATH/IPFW_SCRIPT" #指定具有执行权限的 ipfw rule 脚本

IPFW 語法

...

 

FreeBSD_11-系统管理——{Part_8-IPFW}

标签:color   执行   配置文件   指定   freebsd   动态   脚本   keyword   firewall   

原文地址:http://www.cnblogs.com/hadex/p/6068493.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!