Question
How do I configure SNAT on IPTables
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×setcap 'cap_net_bind_service=+ep' /path/to/binary
sudo
as necessarysetcap
Still haven’t received a more elegant solution.
I have SSL needs now too, so add a line into console:
sudo iptables -t nat -A PREROUTING -p tcp –dport 443 -j REDIRECT –to-port 10443
You can also use nginx or HAProxy as a reverse proxy that listen on port 80 and proxy requests to your Go apps.
See How To Use HAProxy to Set Up HTTP Load Balancing on an Ubuntu VPS and How To Configure Nginx as a Front End Proxy for Apache (skip the Apache section).