Created
May 31, 2015 16:41
-
-
Save doubledouble/7723f67e18efba06f0cf to your computer and use it in GitHub Desktop.
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
[root@Iven sysconfig]# cat iptables | |
# Generated by iptables-save v1.4.7 on Mon Jun 1 00:04:12 2015 | |
*nat | |
:PREROUTING ACCEPT [49:4737] | |
:POSTROUTING ACCEPT [2:144] | |
:OUTPUT ACCEPT [2:144] | |
-A PREROUTING -p tcp -m tcp --dport 22222 -j REDIRECT --to-ports 22 | |
COMMIT | |
# Completed on Mon Jun 1 00:04:12 2015 | |
# Generated by iptables-save v1.4.7 on Mon Jun 1 00:04:12 2015 | |
*filter | |
:INPUT ACCEPT [0:0] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [241:30194] | |
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT | |
-A INPUT -p icmp -j ACCEPT | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT | |
-A INPUT -j REJECT --reject-with icmp-host-prohibited | |
-A FORWARD -j REJECT --reject-with icmp-host-prohibited | |
COMMIT | |
# Completed on Mon Jun 1 00:04:12 2015 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment