Created
January 15, 2013 21:37
-
-
Save chrislaskey/4542332 to your computer and use it in GitHub Desktop.
Example generic iptable rules file for forwarding traffic from port 80 to port 8080, used in this case for configuring Jenkins/Hudson to run on port 80. Initial commit is the default iptable rules' output from `iptables-save > /etc/iptables.up.rules` on Ubuntu Server 12.04. The revised commit are the updated rules to forward traffic from port 80…
This file contains hidden or 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
## Filter Table | |
*filter | |
:INPUT ACCEPT [971:197590] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [95:9682] | |
-A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT | |
-A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT | |
COMMIT | |
## NAT Table | |
*nat | |
-A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 | |
COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment