title: How to forward traffic to another dns by port
body: <p>In order for my app to work for example, it needs to communicate with 3 different url:port. Lets say:</p>
  
  <p><code>host1.com:1111</code></p>
  
  <p><code>host2.com:1234</code></p>
  
  <p><code>host3.com:1234</code></p>
  
  <p>(Same port for 2 hosts)</p>
  
  <p>What i want is to use a single url, and the route will be betterment by the port:</p>
  
  <p><code>fathost.com:1111 --&gt; host1.com:1111</code></p>
  
  <p><code>fathost.com:2222 --&gt; host2.com:1234</code></p>
  
  <p><code>fathost.com:3333 --&gt; host3.com:1234</code></p>
  
  <p>(Port 2222 is redirected to 1234 on host2,
  Port 3333 is redirected to 1234 on host3)</p>
  
  <p>Keep in mind that the app is run on a clients machine, so changing iptables is not possible.</p>
  
  <p>Tried a loadbalancer but it can only return a redirect (status code 302,301) and i need it to transfer the request.
  Tried solve it with Dns records (srv), but no luck </p>
  
  <p>Any ideas? (Cloud services also a possible option)</p>
  
  <p>Thanks for the help</p>
  
  <p><strong>UPDATE:</strong>
  Because the app is run on a clients machine, Im asking the client to allow traffic from all 3 hosts (<code>host1, host2, host3</code>), what I want is to only allow traffic from 1 host <code>fasthost.com</code> (that will probably will have a static ip)</p>