December 18, 2009

apf commands

root@server [~]# apf --help


usage /usr/local/sbin/apf [OPTION]

-s|--start ......................... load all firewall policies
-r|--restart ....................... stop (flush) & reload firewall rules
-f|--stop........ .................. stop (flush) all firewall rules
-l|--list .......................... list chain rules
-t|--status ........................ firewall status

-a HOST CMT|--allow HOST COMMENT ... add host (IP/FQDN) to allow_hosts.rules and immediately load new rule into firewall

-d HOST CMT|--deny HOST COMMENT .... add host (IP/FQDN) to deny_hosts.rules and
immediately load new rule into firewall

-u|--unban HOST .................... remove host from [glob_]deny_hosts.rules
and immediately remove rule from firewall

-o|--ovars ......................... output all conifguration options


root@server [~]# /usr/local/sbin/apf -u 59.176.108.175
Deleted from firewall: Deny all to/from 59.176.108.175
root@server [~]# /usr/local/sbin/apf -r
root@server [~]# iptables -L -n |grep 59.176.108.175
root@server [~]#

No comments:

Post a Comment