来源:蜘蛛抓取(WebSpider)
时间:2017-09-24 06:07
标签:
中国知网ip登陆失败
CentOS 7中设置ip白名单
我想安装CentOS 7防火墙,所有传入的请求将被封锁,除了IP白名单。对于白名单的IP的所有端口都要访问?
adding sources to a zone. First checkout which sources there are for your zone:
firewall-cmd --permanent --zone=public --list-sources
If there are none, you can start to add them, this is your "whitelist"
firewall-cmd --permanent --zone=public --add-source=192.168.100.0/24
firewall-cmd --permanent --zone=public --add-source=192.168.222.123/32
(That adds a whole/24and a single IP, just so you have a reference for both a subnet and a single IP)
Set the range of ports you'd like open:
firewall-cmd --permanent --zone=public --add-port=1-22/tcp
firewall-cmd --permanent --zone=public --add-port=1-22/udp
This just does ports 1 through 22. You can widen this, if you'd like.
Now, reload what you've done.
firewall-cmd --reload
And check your work:
firewall-cmd --zone=public --list-all查看: 1530|回复: 2
关于梅林固件如何在游戏模式下设置IP白名单的问题
主题帖子积分
初级魔法师, 积分 101, 距离下一级还需 99 积分
出于节省流量的需求,需要对部分IP设置不走路由器SS。
在chnroutes.txt最上面增加IP/32,结果发现ss不起效了,所有国外的网页都打不开;
改设置为IP/24,现在起效了,而且该IP也不会走SS了,不过不知道为何IP/32不起效
主题帖子积分
高级魔法师, 积分 540, 距离下一级还需 460 积分
直接IP,不要加/32
主题帖子积分
初级魔法师, 积分 101, 距离下一级还需 99 积分
直接IP,不要加/32
已经试过了,没有效果
IP/32和IP的效果应该是一样的,看起来有点像是DNS解析不了,采用的ss-tunnel解析
Powered by判断某IP是否在白名单中? - 知乎3被浏览981分享邀请回答还没有回答