Created
September 16, 2018 18:12
-
-
Save mrladeia/a656379a1a2809291c9d759047436740 to your computer and use it in GitHub Desktop.
Lista de excessão Iptables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -A INPUT -p TCP --dport (port) -s A,B -j ACCEPT | |
iptables -A INPUT -p TCP --dport (port) -j DROP | |
After any days....... I add IP C | |
iptables -I INPUT -p tcp --dport (port) -s C -j ACCEPT | |
Or add in line 1 | |
iptables -I 1 INPUT -p tcp --dport (port) -s C -j ACCEPT | |
CentOS | |
service iptables save | |
Debian | |
iptables-save > /etc/iptables.rules | |
nano /etc/network/if-pre-up.d/firewall | |
#!/bin/bash | |
/sbin/iptables-restore < /etc/iptables.rules | |
chmod +x /etc/network/if-pre-up.d/firewall | |
reboot | |
iptables -L |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment