0

Support I have a host A with ip 9.21.118.35, in this host there exists a virtual server with ip 192.168.130.11 and virtual server expose port 31666.

Then I want to connect to virtual server (192.168.130.11 : 31666) from another remote host B with ip 9.21.118.157. host 9.21.118.157 can communicate with host 9.21.118.35.

The question is, is there any ways (tunnel? or HAProxy? or iptable? ...) to make it possible that remote host B (9.21.118.157) can connect virtual server (192.16.130.11)?

Please share your detail commands how to approach it? Thanks in advanced.

Joe
  • 101

1 Answers1

0

If you control all network devices between the hosts, or you have a VPN connection between the two hosts, then yes. If either of the above is false, then no, you cannot. If the above is true AND you add the appropriate routes for the 192.168.130.x/x (complete with appropriate CIDR) in each network device from host B to host A and back again, then yes, this is possible.

All of these (including the definition of VPN networks) will need the route defined: Host B --> gateway --> Location B firewall --> <--VPN --> Location A firewall --> switch(es) --> Host A

PSn00b
  • 59
  • 2
  • Host A and Host B are in the same network, they communicate without any problem. But Host A has a virtual IP 192.168.130.x, I want to send message to it from Host B, so I want to know how to set router or iptable or porxy in the host A, let Host B communicate to virtual IP 192.168.130.x in the Host A. – Joe Mar 26 '20 at 02:11
  • If the default gateway for HostA and HostB is the same device, then add a route on that device for 192.168.130.x to the private IP of HostA. Then on HostA, add a route for 192.168.130.x to use IP of the virtual adapter giving network access for VM-A. – PSn00b Mar 26 '20 at 21:16