欢迎各位兄弟 发布技术文章
这里的技术是共享的
# iptables -A INPUT -s 10.54.0.0/16 -j ACCEPT #
# iptables -A INPUT -s 10.181.0.0/16 -j ACCEPT
# iptables -P INPUT DROP
# iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited
iptables -I INPUT 7 -s 10.177.0.0/16 -j ACCEPT
[root@js1p-es-web ~]# iptables -L -n -v --line-numbers
Chain INPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 3563 2267K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
3 49 2940 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
4 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 1456 125K ACCEPT all -- * * 10.54.0.0/16 0.0.0.0/0
6 0 0 ACCEPT all -- * * 10.181.0.0/16 0.0.0.0/0
7 6 1968 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited