找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
楼主: dovihila

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

[复制链接]

10

主题

102

回帖

256

积分

中级会员

积分
256
发表于 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教程 去吧( 我不觉得有用
回复

使用道具 举报

39

主题

1191

回帖

2565

积分

金牌会员

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

使用道具 举报

118

主题

1058

回帖

2606

积分

金牌会员

积分
2606
发表于 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

好全,学习了
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Discuz! X

GMT+8, 2025-4-20 12:06 , Processed in 0.020011 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表