0

I use Proxmox VE (Debian) for my VM. In order to reach my KVM computers externally, NAT is used with port forwarding.

Unfortunately, no VM can connect to the external IPv4 of the host.

But all VMs can connect to the internet and can be reached externally.

A connection between 2 VM can currently only be established via internal local IPv4.

How can I fix the error?

Root
  • 31
  • 1
  • 5

1 Answers1

2

This situation is famous as the routing triangle. It can be solved with adding the additional SNAT or MASQUERADE rule. It has been described very detailed in the iptables tutorial.

the routing triangle

The universal rule:

iptables -t nat -A POSTROUTING \
         --src <vm-net> --dst <vm-net> \
         -m conntrack --ctstate DNAT --ctorigdst <ext-ip> \
  -j MASQUERADE
Anton Danilov
  • 5,082
  • 2
  • 13
  • 23
  • https://forum.proxmox.com/threads/1x-nic-mit-2-public-ips-mit-2x-nat.55914/#post-258426 its german but maxbe the config works for you – djdomi Jul 23 '19 at 20:05