0

I have a server (10.10.10.2) that can't access the internet and has an APP on it that needs to access a service on public IP w.x.y.z. Another server (10.10.10.3) that does have internet access can connect to public IP w.x.y.z

10.10.10.2 and 10.10.10.3 are on the same internal network How would I get 10.10.10.2 to connect to w.x.y.z via 10.10.10.3 I am trying with iptables but getting nowhere.

Thanx in adv

4
  • Why don't you just set the same default gateway and nameserver on 10.10.10.2 as on 10.10.10.3?
    – Rob
    Dec 10, 2013 at 10:10
  • Sorry, forgot to mention, the server on the public IP (w.x.y.z) will only accept connections from my one public IP. and the box Nat'ed behind this is 10.10.10.3
    – Chomps
    Dec 10, 2013 at 10:20
  • @Chomps22: So 10.10.10.3 is behind a static (one IP to one IP) NAT? Do you really need static NAT for outgoing connections from 10.10.10.3 or will it suffice just for incoming connections? Dec 10, 2013 at 10:46
  • Hi, Thank you for your replies. I had this running on another server before but lost the iptables config. All my servers have static internal IP's and Static public IP's assigned to them on a fortigate firewall. Instead of making a routing rule on the fortigate (no more changes allowed until next year), I just need to route traffic on 10.10.10.2 destined for the public ip w.x.y.z on port 5000 to route via the (allowed on the firewall) server 10.10.10.3
    – Chomps
    Dec 10, 2013 at 11:01

1 Answer 1

0

You usually need to interfaces for masquerading a.k.a internet connection sharing, but you can also do it with only one physical interface (on 10.10.10.3). Take a look at this post, it explains the neccessary steps in detail: http://www.miljan.org/main/2006/12/26/linux-nat-with-one-network-interface/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .