title: linux iptables redirect outgoing traffic to local port
body: <p>I want redirect all outgoing traffic with port <code>8080</code> to local port <code>8080</code></p>
  
  <p>for example i create server with this command <code>nc -l -p 8080</code> and i want when use this command <code>nc 1.2.3.4 8080</code> , <code>nc</code> redirect and connect to <code>127.0.0.1:8080</code></p>
  
  <p>i try with this command:</p>
  
  <pre><code>iptables -t nat -A POSTROUTING -p tcp --dport 80 -o eth0 -j SNAT --to-source IP
  </code></pre>
  
  <p>but not worked!</p>
  
  <p>how to do it?</p>