iptables限制地址访问

chao 2022-5-13 15:19 CentOS&Ubuntu 抢沙发 548IT人生
# Generated by iptables-save v1.4.7 on Wed Jan 28 08:08:49 2015
*filter
:INPUT ACCEPT [5:388]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [5:588]
-A INPUT -s 192.168.88.0/24 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -s 119.82.254.232/29 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -s 103.14.250.48/29 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -s 119.15.95.224/28 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -s 119.82.254.50/32 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -s 111.67.104.87/32 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -s 103.248.187.48/28 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -s 101.78.198.112/28 -p tcp -m tcp --dport 80 -j ACCEPT

-A INPUT -s 103.248.186.71/32 -p tcp -m tcp --dport 80 -j ACCEPT


-A INPUT -s 192.168.88.0/24 -p tcp -m tcp --dport 33833 -j ACCEPT


#local network
-A INPUT -s 119.82.254.232/29 -p tcp -m tcp --dport 33833 -j ACCEPT
-A INPUT -s 103.14.250.51/29 -p tcp -m tcp --dport 33833 -j ACCEPT
#IT bedroom
-A INPUT -s 119.82.254.50/32 -p tcp -m tcp --dport 33833 -j ACCEPT
-A INPUT -s 111.67.104.87/32 -p tcp -m tcp --dport 33833 -j ACCEPT
#new office
-A INPUT -s 101.78.198.112/28 -p tcp -m tcp --dport 33833 -j ACCEPT
#hongkong server room pc computer
-A INPUT -s 119.15.95.224/28 -p tcp -m tcp --dport 33833 -j ACCEPT
#hotel bedroom
-A INPUT -p tcp -m tcp --dport 80 -j DROP
-A INPUT -p tcp -m tcp --dport 33833 -j DROP
COMMIT
# Completed on Wed Jan 28 08:08:49 2015

正文部分到此结束

版权声明:除非注明,本文由( chao )原创,转载请保留文章出处

本文链接:iptables限制地址访问

继续浏览:iptables

分享文章:QQ空间腾讯微博新浪微博网易微博人人网开心网腾讯朋友百度搜藏

iptables限制IP访问
CentOS系统安装配置