Friday, April 7, 2017

How to add redirects for Web and SSL ports

iptables -F

iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

iptables -t nat -I OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8080

iptables -t nat -I PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8181

iptables -t nat -I OUTPUT -p tcp --dport 443 -j REDIRECT --to-ports 8181


better yet...

iptables -t nat -A OUTPUT -p tcp -d XX.XX.XX.XX --dport 443 -j REDIRECT --to-port 8181
iptables -t nat -A OUTPUT -p tcp -d
XX.XX.XX.XX:80 -j REDIRECT --to-port 8080

No comments:

Post a Comment

The source code for gliesians.com is for sale on Ebay.

I've decided to shut down gliesians.com and sell the source code. If anyone is looking to purchase the related source, you can find it...