I tried the first command “iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 127.0.0.1:8080” and restarted the server, but it still doesn’t forward.
Also, another self hosted app that I use (Shout IRC) was able to work with the port redirect “sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080” but for some reason it just doesn’t work for MineOS.
Exactly as the example, unless I was meant to change a part of it. I did say I wasn’t too experienced with this. I ran the command on the same VPS that’s got MineOS on it; which is Ubuntu 14.04 LTS on a Windows Azure VPS.
Oh, you need to save the rules, you can’t type it then restart because you’ll lose it. just type it in and test it. if it works you need to save the iptables rules (you can google that).
Are you wanting to change it from HTTPS to HTTP or just change the port to 80?
From start to finish, here’s how you can set it up without the port number in the URL:
# vi /etc/mineos.conf
[ change port 8080 to 443 in config ]
# iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
# iptables -D INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
[ test web-ui connectivity here, and if successful, commit the iptables rules ]
# iptables-save > /etc/iptables-rules
For good measure, after successfully logging in to the server with the URL: https://ipaddress (without port), restart your server, to ensure firewall rules, etc. are all committed properly.
Note, this doesn’t utilize the iptables’ PREROUTING directive, but in this case, prerouting is overkill for the sake of getting your goal of a port-free URL.