title: Forward traffic on specific network interface to specific host
body: <p>This machine has two interfaces <code>eth0</code> and <code>eth1</code>. There is a default gateway on <code>eth0</code>:</p>
  
  <pre><code>Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  default         10.0.2.1        0.0.0.0         UG    0      0        0 eth0
  10.0.2.0        *               255.255.255.0   U     0      0        0 eth0
  10.0.2.0        *               255.255.255.0   U     0      0        0 eth1
  </code></pre>
  
  <p>I need to set up rules with <code>iptables</code> to proxy all incoming traffic on <code>eth1</code> to <code>10.0.1.1</code>.</p>
  
  <p>Note that <code>eth0</code> is associated with a static IP address <code>10.0.2.2</code> while <code>eth1</code> is dynamic.</p>
  
  <p>There is a guide on <a href="http://kreiger.linuxgods.com/kiki/?Port+forwarding+with+netfilter" rel="nofollow">port forwarding with netfilter</a> that explains how to do this in a slightly simpler setup, but I can't figure out how to go from their example to mine.</p>