#!/bin/bash
read -p “Please input the IP you wanna to block: ” blockip
iptables -I INPUT -s $blockip -j DROP
service iptables save
脚本如上图,效果。选哦收购该输入。嗯,还不错,至少阿福的博客,每天只有1个IP发垃圾评论,ban之即可。
未经允许不得转载:啊福主机 » 自制iptables 手工输入IP ban IP shell
#!/bin/bash
read -p “Please input the IP you wanna to block: ” blockip
iptables -I INPUT -s $blockip -j DROP
service iptables save
脚本如上图,效果。选哦收购该输入。嗯,还不错,至少阿福的博客,每天只有1个IP发垃圾评论,ban之即可。
未经允许不得转载:啊福主机 » 自制iptables 手工输入IP ban IP shell