iptables [-t table] command [match] [target/jump] -A, --appendiptables-AINPUTO -D, --deleteiptables-DINPUT--dport80-jDROP或iptables-DINPUT1-R, --replace-l, --insert-L, --listO -F, --flush-N, --new-chain -X, --delete-chain -E, --rename-chain
iptables [-t table] command [match] [target/jump] ⚫ -A, -append iptables -A INPUT . ⚫ -D, -delete iptables -D INPUT -dport 80 -j DROP或iptables -D INPUT 1 ⚫ -R, -replace ⚫ -I, -insert ⚫ -L, -list ⚫ -F, -flush ⚫ -N, -new-chain ⚫ -X, -delete-chain ⚫ -E, -rename-chain
iptables [-t table] command [match] [target/jump]genericmatches(通用的匹配),适用于所有的规则:TCPmatches,只能用于TCP包●UDPmatches,只能用在UDP包●ICMPmatches,针对ICMP包的;针对的是状态(state),所有者(owner)和访问的频率限制(limit)等参数的匹配
iptables [-t table] command [match] [target/jump] ⚫generic matches(通用的匹配),适用于 所有的规则; ⚫TCP matches,只能用于TCP包 ⚫UDP matches,只能用在UDP包 ⚫ICMP matches ,针对ICMP包的; ⚫针对的是状态(state),所有者(owner) 和访问的频率限制(limit)等参数的匹配
iptables [-t table] command [match] [target/jump直接匹配通用匹配:规则直接给出iptables -A INPUT -p tcpiptables -A INPUT -s 192.168.1.1iptables -A INPUT -d 192.168.1.1iptables -A INPUT -i ethoiptables -A FORWARD -o eth0
iptables [-t table] command [match] [target/jump] ⚫通用匹配:规则直接给出 ⚫iptables -A INPUT -p tcp ⚫iptables -A INPUT -s 192.168.1.1 ⚫iptables -A INPUT -d 192.168.1.1 ⚫iptables -A INPUT -i eth0 ⚫iptables -A FORWARD -o eth0 直接匹配