Created
September 30, 2014 21:16
-
-
Save BenWhitehead/87eed5ae9958a1beded8 to your computer and use it in GitHub Desktop.
Ansible iptables commands for http(s) routing
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
--- | |
- name: iptables open 443 | |
command: iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT | |
- name: iptables 443 -> 8443 | |
command: iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443 | |
- name: iptables open 80 | |
command: iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT | |
- name: iptables 80 -> 8080 | |
command: iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment