- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業務經營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯網協會理事單位
- 安全聯盟認證網站身份V標記
- 域名注冊服務機構許可:滇D3-20230001
- 代理域名注冊服務機構:新網數碼
鏈:INPUT、OUTPUT、PREROUTING、FORWARD、POSTROUTING
表:filter、nat、mangle、raw
查看指定表的指定鏈中的規則
iptables -t 表名 -L 鏈名
查詢規則的序號
iptables --line-numbers -vnL INPUT
增規則
# -I 在鏈的首部插入規則
iptables -t filter -I INPUT -s 192.168.2.101 -j DROP
# -A 在鏈的尾部追加
iptables -t filter -A INPUT -s 192.168.2.101 -j ACCEPT
# 在指定行加入規則
iptables -t filter -I INPUT 4 -s 192.168.2.104 -j DROP
刪除規則
#根據規則編號刪除
iptables -t filter -D INPUT 4
#根據具體的匹配條件與動作刪除規則
iptables -t filter -D INPUT -s 192.168.2.103 -j ACCEPT
#清空指定鏈規則
iptables -t filter -F INPUT
修改規則
# -P 修改鏈中默認策略
iptables -t filter -P INPUT DROP
保存規則
service iptables save
#iptables-save 保存規則到iptables
iptables-save > /etc/sysconfig/iptables
#從iptables重載規則
iptables-restore < /etc/sysconfig/iptables
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP