MarkusBehmer
Contributor
Contributor

How can a VM connect itself on external IP trough VSE

Hello Community,

I've a problem to connect a vm from itself on it's erxternal IP trough a vse.

I've in my webapplication a link to a vhost an the same vm. The vm resolv this name to the external IP of itself and get a connection refused. If i use the internal IP of the vm, than all it's ok.

NAT and firwall rules are ok, from outside, there are no problems to connect the vm.

Is there a way to connect a vm itself by external IP?

Thanks

Markus

0 Kudos
5 Replies
SK21090
Enthusiast
Enthusiast

if you could show in a small diagram and some screenshots what is the design it will be better

it will be difficult to understand this way

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! VCAP-DCV | VCP-DCV | VCP-NV | MCSA
0 Kudos
MarkusBehmer
Contributor
Contributor

Sure, i hope this helps

-----------------------------           --------     IP internal: 192.168.X.Y

|          VSE                  | ------- | VM2|     IP external: e.f.g.h

-----------------------------           --------     Resolv: test2.example.com e.f.g.h

  |

  |

--------     IP internal: 192.168.X.X

| VM1|     IP external: a.b.c.d

--------     Resolv: test.example.com a.b.c.d

Scenario A:

Webapp1 link to test.example.com

Webapp2 link to test2.example.com

VM1 resolv test.example.com a.b.c.d Connection refused

The same with test2.example.com

Scenario B:

/etc/hosts:    192.168.X.X test.example.com

                    192.168.X.Y test2.example.com

Webapp1 link to test.example.com

Webapp2 link to test2.example.com

VM1 resolv test.example.com 192.168.X.X Connection success

The same with test2.example.com

The webapp have to link to test.example.com or test2.example.com.

My problem is to connect from vm to its own external IP or the external address of VM2. The vm means its an external IP and goes to the vse and the vse refused the connection, but i don't know why.

I need an solution to send traffic from VM1 for a.b.c.d or e.f.g.h to the vse and back to 192.168.X.X or 192.168.X.Y, if possible at all.

NAT (DNAT and SNAT) and Firewall Rules are configured for both vm's.

Thanks

Markus

0 Kudos
cfor
Expert
Expert

Using vCNS or NSX version of the edge?  Asking as I am not sure if NSX would allow, but the vCNS version does not.  1:1 Nat is not looped back in the device per my understating.

ChrisF (VCP4, VCP5, VCP-Cloud) - If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
MarkusBehmer
Contributor
Contributor

I feared it

I'm not sure wich version is it. It's the new Edge-Gateway from VMware for vCloud Director.

Where can i see which version the edge gateway is?

Thanks

Markus

0 Kudos
mavelite
Enthusiast
Enthusiast

So basically you want the VM's to connect to each other via their public IP's, not the internal NAT. This should work assuming you have DNS setup correctly on the Edge itself. The VM's will resolve their public IP's if the VM's point to the Edge as the DNS source and the Edge points to your external DNS servers with public IP's as their source.

Basically whatever the forward and reverse DNS entries are set to is what the VM's will resolve to and attempt to communicate over.

0 Kudos