跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 屏蔽BT下载/邮件滥用 防警告
未分類
14 6 月 2021

屏蔽BT下载/邮件滥用 防警告

KDE 大佬有话说 :

屏蔽BT下载/邮件滥用 防警告

清楚所有
iptables -F

禁止所有进站/转发 允许所有出站
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

允许已建立的进站 允许PING 允许本机内部环回
iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp –icmp-type echo-request -j ACCEPT
iptables -A INPUT -i lo -p all -j ACCEPT

允许已建立的转发
iptables -A FORWARD -m state –state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -p udp –dport 2408 -d 162.159.192.1 -j ACCEPT
iptables -t nat -A PREROUTING -p udp –dport 8443 -j DNAT –to-destination 162.159.192.1:2408
iptables -t nat -A POSTROUTING -d 162.159.192.1 -p udp –dport 2408 -j MASQUERADE
sysctl -w net.ipv4.ip_forward=1

允许进站端口
iptables -A INPUT -p tcp –dport 22 -j ACCEPT
iptables -A INPUT -p tcp –dport 80 -j ACCEPT
iptables -A INPUT -p tcp –dport 443 -j ACCEPT
iptables -A INPUT -p udp –dport 53 -j ACCEPT
iptables -A INPUT -p udp –dport 8443 -j ACCEPT
iptables -A INPUT -p udp –dport 2408 -j ACCEPT
iptables -A INPUT -p udp –dport 4000 -j ACCEPT

关键词封锁
iptables -A OUTPUT -m string –string "torrent" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string ".torrent" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "peer_id=" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "announce" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "info_hash" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "get_peers" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "find_node" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "BitTorrent" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "announce_peer" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "BitTorrent protocol" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "announce.php?passkey=" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "magnet:" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "xunlei" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "sandai" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "Thunder" –algo bm –to 65535 -j DROP
iptables -A OUTPUT -m string –string "XLLiveUD" –algo bm –to 65535 -j DROP

https://i.loli.net/2021/06/14/m5lWCKZwpShbcUd.png

lemonSSS 大佬有话说 :

收藏了 yc010t

KDE 大佬有话说 :

参考

1 Security Guide Red Hat Enterprise Linux 6 _ Red Hat Customer Portal.html
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html-single/security_guide/index#sect-Security_Guide-Firewalls-Using_IPTables

2『原创』iptables 封禁 BT_PT_SPAM(垃圾邮件)和自定义端口_关键词 一键脚本 _ 逗比根据地.html
https://doubibackup.com/tfma58rb.html

micms 大佬有话说 :

优秀mark大佬教程https://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具