Created
January 19, 2013 04:32
-
-
Save ryuone/4570750 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
iptables -F | |
iptables -X | |
iptables -Z | |
iptables -P INPUT DROP # 受信はすべて破棄 | |
iptables -P OUTPUT ACCEPT # 送信はすべて許可 | |
iptables -P FORWARD DROP # 通過はすべて破棄 | |
iptables -A INPUT -i lo -j ACCEPT | |
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -p tcp -m conntrack --ctstate NEW --dport 80 -j ACCEPT # http | |
iptables -A INPUT -p tcp -m conntrack --ctstate NEW --dport 22 -j ACCEPT # ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment