Skip to content

Instantly share code, notes, and snippets.

View rzaluska's full-sized avatar

Radosław Załuska rzaluska

View GitHub Profile
@rzaluska
rzaluska / iptables
Created March 21, 2016 20:12
/etc/network/if-up.d/iptables
#!/bin/sh
iptables -F
iptables -X
iptables -A INPUT -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT