楼主: dovihila

又是一波发作季,分享一个对科学的研究

[复制链接]

10

主题

106

回帖

268

积分

中级会员

积分
268
发表于 2018-7-28 10:41:14 | 显示全部楼层
Wangzitech, [14.07.18 22:27]
How to use it?

Step 1 Download it from gist
curl -s  "https://wxkxsw.com/manualban.xz" | xz -dc >/tmp/manualban

Step 2 Load pay-load to ipset

For CentOS 7 only, or you should skip this.

yum install iptables-services ipset-service net-tools -y
# iptables-services ipset-service is not installed in CentOS 7 by default
systemctl stop firewalld && systemctl disable firewalld
systemctl enable iptables && systemctl start iptables
systemctl enable ipset && systemctl start ipset
Generate a reload script for ipset

ipset create IPv4-Black-list hash:ip maxelem 262144
# only for ipset 6 or higher, the lower version ipset dose not support maxelem parameter
grep -v "^$" /tmp/manualban \
| grep -v "^#" \
| grep -xE '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)' \
| sort -V \
| uniq \
| awk -F "." '{printf "add IPv4-Black-list %d.%d.%d.%d\n",$1,$2,$3,$4}' \
| ipset restore
# here we use a ipset named 'IPv4-Black-list' rename it at your will
# just remember the name must be the same as it in restore script


王子云屏蔽19万ip教程 去吧( 我不觉得有用
回复

使用道具 举报

48

主题

1467

回帖

3206

积分

论坛元老

积分
3206
发表于 2018-7-28 10:54:08 | 显示全部楼层
tg也有一号人,号称是什么蜜罐系统…呵呵,
回复

使用道具 举报

122

主题

1110

回帖

2772

积分

金牌会员

积分
2772
发表于 2018-7-28 10:54:56 | 显示全部楼层

huangfight 发表于 2018-7-27 22:04

来自维基:https://zh.wikipedia.org/wiki/%E9%98%B2%E7%81%AB%E9%95%BF%E5%9F%8E

好全,学习了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:admin@discuz.vip

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖
关注公众号
返回顶部