title: How to do local port forwarding with iptables
body: <p>I have an application (server) listening on port 8080. I want to be able to forward port 80 to it, such that hitting <code>http://localhost</code> resolves my application (on <code>localhost:8080</code>).</p>
  
  <p>This should be generalized for any port mapping (e.g. <code>80:8080</code> => <code>P_src:P_target</code>), and use best practices for modern *nix machines (e.g. Ubuntu).</p>
  
  <p><strong>N.B. This is all done locally, so there is no need to accept connections from anyone but localhost.</strong></p>