Using Port 80 with iptables

ManualWorks uses port 1975. To use port 80 on Linux, you must start ManualWorks as root or integrate it with a web server that uses port 80.

If ManualWorks is installed on a Linux server where no other program uses port 80, you can also use port 80 with an iptables setting.

Set it with the following command.

iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 1975

Run it as root.

eth0, set with the i option, is the device connected to the internet. The name can differ by server. Check it with the following command.

cat /proc/net/dev

You can also check it with the ifconfig command.

Check the setting with the following command.

iptables -t nat -L

To delete the setting, run the following command.

iptables -D PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 1975

If you set HTTPS on port 8443, forward requests on port 443 to port 8443 with the following command.

iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443

Rules set with the iptables command disappear when the server restarts. To keep them after a reboot, save them in the way that fits your distribution. For example, on Debian and Ubuntu, install the iptables-persistent package and run netfilter-persistent save. On RHEL-based systems, install the iptables-services package and run service iptables save.