Last active
August 29, 2015 14:21
-
-
Save cpanxaoc/6178556dd4426becd9b7 to your computer and use it in GitHub Desktop.
Rex iptables DSL example
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 table => q(filter), | |
append => q(INPUT), | |
protocol => q(tcp), | |
match => q(state), | |
state => q(NEW), | |
dport => 22, | |
jump => q(ACCEPT); | |
iptables table => q(filter), | |
append => q(INPUT), | |
protocol => q(tcp), | |
match => q(state), | |
state => q(NEW), | |
dport => 80, | |
jump => q(ACCEPT); | |
generates... | |
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT | |
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment