Last active
August 29, 2015 13:56
-
-
Save vicendominguez/8978478 to your computer and use it in GitHub Desktop.
Firewall rules to redirect Glassfish 4.0 ports (80,443,8080 and 8181 will be open to internet)
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
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 8181 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 80 -j ACCEPT | |
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 | |
iptables -A INPUT -p tcp --dport 443 -j ACCEPT | |
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8181 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment