因为总是忘记pfctl的命令,所以记下一些。
规则相关
- 查看当前规则
# pfctl -s rules
- 如果要查看统计信息,请加上-v
# pfctl -vs rules
表格操作
- 表格列表
# pfctl -s Tables
- 如果要查看统计信息,请加上-vv
# pfctl -vvs Tables
- 显示表格的IP地址列表
# pfctl -t <table> -T show
- 向表格中添加IP地址
# pfctl -t <table> -T add <IPAddress>
- 从表格中删除IP地址
# pfctl -t <table> -T delete <IPAddress>
- 清空表格中的所有IP地址
# pfctl -t <table> -T flush