Last active
March 20, 2017 18:51
-
-
Save tuxmartin/47d0b7289d052bafe551b75787ac01f5 to your computer and use it in GitHub Desktop.
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
#echo 1 > /proc/sys/net/ipv4/ip_forward | |
iptables -F | |
iptables -X | |
#smaze vsechna pravidla | |
iptables -P INPUT DROP | |
iptables -P OUTPUT ACCEPT | |
iptables -P FORWARD DROP | |
#politika firewallu | |
iptables -A INPUT -i lo -j ACCEPT | |
iptables -A OUTPUT -o lo -j ACCEPT | |
#mistni smycka povolena | |
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
iptables -A FORWARD -m state --state=RELATED,ESTABLISHED -j ACCEPT | |
iptables -I INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -A INPUT -i ppp0 -j ACCEPT | |
iptables -A INPUT -i tun0 -j ACCEPT | |
iptables -A INPUT -j REJECT --reject-with icmp-admin-prohibited |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment