Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[FreeBSD] FreeBSD - PF Firewall (3)

14 views
Skip to first unread message

或許…我不是我

unread,
Jan 17, 2005, 9:10:59 AM1/17/05
to

FreeBSD with Packet Filter(PF) Firewall - (3)

※ pfctl 的用法

pfctl 是可以直接控制 PF Firewall 的指令。

1. 啟用 PF

# pfctl -e

2. 停用 PF

# pfctl -d

3. 讀取/重讀 PF 設定檔

# pfctl -f /etc/pf.conf

- 僅重讀 PF 設定檔中的 Options 部份
# pfctl -f /etc/pf.conf -O

- 僅重讀 PF 設定檔中的 queue 部份
# pfctl -f /etc/pf.conf -A

- 僅重讀 PF 設定檔中的 NAT 部份
# pfctl -f /etc/pf.conf -N

- 僅重讀 PF 設定檔中的 filter rules
# pfctl -f /etc/pf.conf -R

4. 查看 PF 資訊

# pfctl -s info
# pfctl -s memory
# pfctl -s rules
# pfctl -vs rules
# pfctl -s nat
# pfctl -s queue
# pfctl -s all

5. 清除 PF 規則

# pfctl -F nat
# pfctl -F queue
# pfctl -F rules
# pfctl -F info
# pfctl -F Tables
# pfctl -F all

6. PF Tables 的使用

# pfctl -t table_name -T add spammers.org
# pfctl -t table_name -T delete spammers.org
# pfctl -t table_name -T flush
# pfctl -t table_name -T show
# pfctl -t table_name -T zero


--

\||||||/ 「一直到中古時期結束之前,理性代表具備一種心智,能夠看
q ^ ^ p 出各種事物之間精神層次的關聯、在主體與客體之間的律動
╰ 0 ╯ o 、微妙平衡或分配比率。 」
</ 菠 \-/ - Seven Life Lessons of Chaos
--
[1;32m※ Origin: [33mSayYA 資訊站 [37m<bbs.sayya.org> [m
[1;31m◆ From: [36m61-224-80-30.dynamic.hinet.net [m

0 new messages