 <p>Non-root user should not use ports below 1024. It is better to do port forwarding from 80 to 8080 and 443 (https default) to 8181.</p> <p>Execute this as root:</p> <pre><code>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 </code></pre> <p>Need to make this permanent:</p> <pre><code>iptables-save -c &gt; /etc/iptables.rules iptables-restore &lt; /etc/iptables.rules </code></pre> <p>and call during startup, <em>vi /etc/network/if-pre-up.d/iptablesload</em></p> <pre><code>#!/bin/sh iptables-restore &lt; /etc/iptables.rules exit 0 </code></pre>