title: Iptables Add DNAT rules to forward request on an IP:port to a container port
body: <p>I have a kubernetes cluster which has 2 interfaces:
  eth0: 10.10.10.100 (internal)
  eth1: 20.20.20.100 (External)</p>
  
  <p>There are few pods running in the cluster with flannel networking.
  POD1: 172.16.54.4 (nginx service)</p>
  
  <p>I want to access 20.20.20.100:80 from another host which is connected to the above k8s cluster, so that I can reach the nginx POD.</p>
  
  <p>I had enabled ip forwarding and also added DNAT rules as follows:</p>
  
  <pre><code>iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 172.16.54.4:80
  </code></pre>
  
  <p>After this when I try to do a curl on 20.20.20.100, I get </p>
  
  <pre><code>Failed to connect to 10.10.65.161 port 80: Connection refused
  </code></pre>
  
  <p>How do I get this working?</p>