防火牆配置

2021-08-21 19:46:28 字數 2125 閱讀 2253

一次在某個防火牆配置策略裡看到如下的**:

iptables -a input -p icmp --icmp-type 8 -j accept

iptables -a forward -p icmp --icmp-type 8 -j accept

iptables -a input -p icmp --icmp-type 11 -j accept

iptables -a forward -p icmp --icmp-type 11 -j accept

當時對於icmp-type後面的**感覺很不解,不知道後面的數字是什麼意思,後來從網上找了下,發現具體做用如下(看來學無止境啊!):

icmp型別

type

code

description

query

error00

echo reply——回顯應答(ping應答)x3

0network unreachable——網路不可達x3

1host unreachable——主機不可達x3

2protocol unreachable——協議不可達x3

3port unreachable——埠不可達x3

4fragmentation needed but no frag. bit set——需要進行分片但設定不分片位元x3

5source routing failed——源站選路失敗x3

6destination network unknown——目的網路未知x3

7destination host unknown——目的主機未知x3

8source host isolated (obsolete)——源主機被隔離(作廢不用)x3

9destination network administratively prohibited——目的網路被強制禁止x3

10destination host administratively prohibited——目的主機被強制禁止x3

11network unreachable for tos——由於服務型別tos,網路不可達x3

12host unreachable for tos——由於服務型別tos,主機不可達x3

13communication administratively prohibited by filtering——由於過濾,通訊被強制禁止x3

14host precedence violation——主機越權x3

15precedence cutoff in effect——優先中止生效x4

0source quench——源端被關閉(基本流控制)50

redirect for network——對網路重定向51

redirect for host——對主機重定向52

redirect for tos and network——對服務型別和網路重定向53

redirect for tos and host——對服務型別和主機重定向80

echo request——回顯請求(ping請求)x9

0router advertisement——路由器通告100

route solicitation——路由器請求110

ttl equals 0 during transit——傳輸期間生存時間為0x11

1ttl equals 0 during reassembly——在資料報組裝期間生存時間為0x12

0ip header bad (catchall error)——壞的ip首部(包括各種差錯)x12

1required options missing——缺少必需的選項x13

0timestamp request (obsolete)——時間戳請求(作廢不用)x14

timestamp reply (obsolete)——時間戳應答(作廢不用)x15

0information request (obsolete)——資訊請求(作廢不用)x16

0information reply (obsolete)——資訊應答(作廢不用)x17

0address mask request——位址掩碼請求x18

0address mask reply——位址掩碼應答

分類: 003-linux監控

配置防火牆

今天學了下如何配置網路防火牆,用於過濾乙個段的ip位址不能訪問路由器。第二步開啟防火牆 firewall enable 第三步設定預設,允許或者禁止 firewall default permit 第四步設定規則 acl number 2001 rule 1 deny source 192.168....

防火牆配置

環境 ensp 防火牆usg6000v cloud web端登入 預設使用者名稱和密碼admin admin 123telnet登入 系統檢視下開啟telnet server sys usg6000v1 telnet server enable 建立vty下的策略 usg6000v1 user in...

防火牆配置

開啟 systemctl start firewalld 重啟 systemctl restart firewalld 關閉 systemctl stop firewalld 狀態 systemctl status firewalld 防火牆規則 如圖 firewall cmd list all 查...