As stated in the title, my VMs I set up on my proxmox host cannot access services hosted on LXC containers on the same proxmox host.
I encountered this problem now with my Git server hosted in an LXC container and a PostgreSQL server in another LXC container.
I want to access these services from a VM running Debian 11 hosting my docker services.
What I tried so far:
I assume I misconfigured something in my network interface of the VM and my apologies if it is something obvious but I have been looking for weeks and cannot figure it out.
I encountered this problem now with my Git server hosted in an LXC container and a PostgreSQL server in another LXC container.
I want to access these services from a VM running Debian 11 hosting my docker services.
What I tried so far
- Accessing these services from another LXC container or from an outside remote computer such as my desktop PC or laptop (Win10 and Debian12) is not a problem.
- Ping between VM and LXC works.
- Using
nc -v10.0.105.157 5432
for example to accesspsql
port works from the router, node shell and other LXC but returnsconnection timed out
if ran from the VM - Installing
psql
on the VM and trying to connect to a database on the LXC container also returnsconnection timed out
- The same goes trying to connect to my Gitea server hosted on another LXC container
- All firewalls in Proxmox should be off on datacenter, node and guest level
- The VMs and the LXCs should be in the same subnet/VLAN (10.0.105.0/24)
- My (OPNsense) router firewall is currently configured to allow all traffic on all ports between hosts in that subnet/vlan for testing purposes.
I assume I misconfigured something in my network interface of the VM and my apologies if it is something obvious but I have been looking for weeks and cannot figure it out.
VM
/etc/network/interfaces
Code:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto ens18
iface ens18 inet static
address 10.0.105.155
netmask 255.255.255.0
gateway 10.0.105.1
dns-nameservers 10.0.105.1
LXC
/etc/network/interfaces
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.0.105.151/32
# --- BEGIN PVE ---
post-up ip route add 10.0.105.1 dev eth0
post-up ip route add default via 10.0.105.1 dev eth0
pre-down ip route del default via 10.0.105.1 dev eth0
pre-down ip route del 10.0.105.1 dev eth0
# --- END PVE ---
Proxmox Node
/etc/network/interfaces
Code:
auto lo
iface lo inet loopback
auto enp6s0f3
iface enp6s0f3 inet manual
iface eno1 inet manual
iface eno2 inet manual
iface eno3 inet manual
iface eno4 inet manual
auto enp6s0f0
iface enp6s0f0 inet manual
auto enp6s0f1
iface enp6s0f1 inet manual
auto enp6s0f2
iface enp6s0f2 inet manual
auto bond0
iface bond0 inet manual
bond-slaves enp6s0f0 enp6s0f1
bond-miimon 100
bond-mode balance-rr
#Bond for link between nodes
auto vmbr1
iface vmbr1 inet static
address 10.0.105.130/32
bridge-ports bond0
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094
#Bridge between nodes
auto vmbr0
iface vmbr0 inet static
address 10.0.105.110/32
gateway 10.0.105.1
bridge-ports enp6s0f3
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094