0

I have 2 servers on my network that also have global IP address, and I need to enable them to talk to each other using their internet IPs.

Local IPs: 192.168.0.17 and .20 Their Internet IPs are: 91.x.x.17 and 91.x.x.20 they are using couple of ports for different purposes.

Servers are both Ubuntu 18.04.

editing hosts file did not work, as I am directly working with IP address. I am looking at iptables and it seems than it can be used to redirect the incoming traffic, is it possible to do this using iptables, and is there a simpler way to do this. Thanks in Advance

  • Are these IP addresses assigned directly to the servers (i.e. do they show up in ip addr), or are they assigned to the router which DNATs everything? – user1686 Nov 22 '19 at 8:49
  • I don't see them at the output of ip addr – hazimdikenli Nov 22 '19 at 8:51
  • Yeah then they're not actually global IPs of the servers, they're global IPs of the router only. Can you check the router's configuration – does it NAT everything for the specified address to the same server, or is it configured to share the 2 addresses across 3+ servers? – user1686 Nov 22 '19 at 9:04
  • I don't have access to router configuration atm, so looks like this can only be solved with the help of network team right, through router and or firewall configuration. I wanted to know if it was possible with some configuration on the hosts. – hazimdikenli Nov 22 '19 at 9:59
  • Yes, it requires network reconfiguration. (Ideally, losing the NAT and assigning addresses directly to servers. Worst case, setting up NAT-hairpinning.) – user1686 Nov 22 '19 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.