Update install
This commit is contained in:
@@ -8,11 +8,18 @@ clear
|
|||||||
# ========================================================================
|
# ========================================================================
|
||||||
mkdir -p /firewall/iptables/bin
|
mkdir -p /firewall/iptables/bin
|
||||||
echo '#!/bin/bash' > /firewall/iptables/bin/fire.sh
|
echo '#!/bin/bash' > /firewall/iptables/bin/fire.sh
|
||||||
|
echo 'sudo service fail2ban stop' >> /firewall/iptables/bin/fire.sh
|
||||||
echo 'nano /etc/iptables/rules.v4' >> /firewall/iptables/bin/fire.sh
|
echo 'nano /etc/iptables/rules.v4' >> /firewall/iptables/bin/fire.sh
|
||||||
echo 'iptables-restore < /etc/iptables/rules.v4' >> /firewall/iptables/bin/fire.sh
|
echo 'iptables-restore < /etc/iptables/rules.v4' >> /firewall/iptables/bin/fire.sh
|
||||||
echo 'iptables-save > /etc/iptables/rules.v4' >> /firewall/iptables/bin/fire.sh
|
echo 'iptables-save > /etc/iptables/rules.v4' >> /firewall/iptables/bin/fire.sh
|
||||||
|
echo 'sudo service fail2ban start' >> /firewall/iptables/bin/fire.sh
|
||||||
ln -sf /firewall/iptables/bin/fire.sh /bin/fire
|
ln -sf /firewall/iptables/bin/fire.sh /bin/fire
|
||||||
curl -s https://raw.githubusercontent.com/theraw/The-World-Is-Yours/master/iptables/rules > /etc/iptables/rules.v4
|
curl -s https://raw.githubusercontent.com/theraw/The-World-Is-Yours/master/iptables/rules > /etc/iptables/rules.v4
|
||||||
chmod +x /bin/fire
|
chmod +x /bin/fire
|
||||||
# ========================================================================
|
# ========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
sudo apt-get install fail2ban -y
|
||||||
|
sudo service fail2ban stop
|
||||||
|
curl -s https://raw.githubusercontent.com/theraw/The-World-Is-Yours/master/iptables/jail.local > /etc/fail2ban/jail.local
|
||||||
|
sudo service fail2ban start
|
||||||
|
|||||||
Reference in New Issue
Block a user