Problem: Within containers I can't connect to webservices which are installed on the same host.
Setting:
Proxmox is installed on an VPS with one public IP. For all the LXC Containers I set up an additional linux-bridge vmbr1.
This is the content of /etc/network/interfaces (I removed all the things about ipv6):
All my LXC - containers use the vmbr1 with 192.168.178.1 (the host) as gateway and the hosts DNS-settings, so that they have access to the internet.
Some container LXC1with the intern IP 192.168.178.200 also provides a service for my website service1.example-xxx.de
Problem:
I just discovered that from inside an LXC2 I can't ping service1.example-xxx.de while I can
ping 1.1.1.1
ping google.com
ping 192.168.178.200 (intern IP of LXC1)
I guess I have to change the DNS-Settings but how?
Setting:
Proxmox is installed on an VPS with one public IP. For all the LXC Containers I set up an additional linux-bridge vmbr1.
This is the content of /etc/network/interfaces (I removed all the things about ipv6):
Code:
auto lo
iface lo inet loopback
auto enp6s18
iface enp6s18 inet manual
auto vmbr0
iface vmbr0 inet static
address xx.xxx.xx.xxx/24
gateway xx.xxx.xxx.xxx
bridge-ports enp6s18
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.178.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s 192.168.178.0/24 -o vmbr0 -j MASQUERADE
post-up /root/iptables.sh
post-down iptables -t nat -D POSTROUTING -s 192.168.178.0/24 -o vmbr0 -j MASQUERADE
source /etc/network/interfaces.d/*
All my LXC - containers use the vmbr1 with 192.168.178.1 (the host) as gateway and the hosts DNS-settings, so that they have access to the internet.
Some container LXC1with the intern IP 192.168.178.200 also provides a service for my website service1.example-xxx.de
Problem:
I just discovered that from inside an LXC2 I can't ping service1.example-xxx.de while I can
ping 1.1.1.1
ping google.com
ping 192.168.178.200 (intern IP of LXC1)
I guess I have to change the DNS-Settings but how?
Last edited: