[SOLVED] Proxmox Hetzner not resolv DNS

demon_mono

Member
Nov 24, 2020
24
1
23
38
Hy ,

I have an AX41 Hetzner Server. I install Promox .
This is the network conf :
Code:
auto lo
iface lo inet loopback
iface lo inet6 loopback

auto enp9s0
iface enp9s0 inet static
  address 65.108.70.104
  netmask 255.255.255.192
  gateway 65.108.70.65
  pointopoint 65.108.70.65
  # route 65.108.70.64/26 via 65.108.70.65
  up route add -net 65.108.70.64 netmask 255.255.255.192 gw 65.108.70.65 dev enp9s0

iface enp9s0 inet6 static
  address 2a01:4f9:6b:4656::2
  netmask 64
  gateway fe80::1

#Our new modifications, paste this part on this config file
auto vmbr0
iface vmbr0 inet static
  address 65.108.70.104
  netmask 255.255.255.255
  bridge_ports none
  bridge_stp off
  bridge_fd 0
  up ip route add 65.108.70.105/32 dev vmbr0

I made a Debian LXC, with ip 65.108.70.105/32, and gateway 65.108.70.104

But the LXC can not resolv DNS , even if it is 8.8.8.8 :
Netwrok configuration

Bash:
root@hetzner ~ # pct enter 100
root@test:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 65.108.70.105/32
# --- BEGIN PVE ---
    post-up ip route add 65.108.70.104 dev eth0
    post-up ip route add default via 65.108.70.104 dev eth0
    pre-down ip route del default via 65.108.70.104 dev eth0
    pre-down ip route del 65.108.70.104 dev eth0
# --- END PVE ---
    pointopoint 65.108.70.104

The /etc/resolv.conf :
Bash:
# --- BEGIN PVE ---
nameserver 8.8.8.8
nameserver 185.12.64.2
nameserver 2a01:4ff:ff00::add:1
nameserver 185.12.64.1
# --- END PVE ---

Result :
Bash:
root@test:~# apt update
Err:1 http://security.debian.org buster/updates InRelease
  Temporary failure resolving 'security.debian.org'
Err:2 http://ftp.debian.org/debian buster InRelease
  Temporary failure resolving 'ftp.debian.org'
Err:3 http://ftp.debian.org/debian buster-updates InRelease
  Temporary failure resolving 'ftp.debian.org'
Reading package lists... Done
Building dependency tree... Done
All packages are up to date.
W: Failed to fetch http://ftp.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'ftp.debian.org'
W: Failed to fetch http://ftp.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'ftp.debian.org'
W: Failed to fetch http://security.debian.org/dists/buster/updates/InRelease  Temporary failure resolving 'security.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

If you have any idea .....

Regards ,
 
Your setup is for a routed configuration. So you need to manually add the route on the guest like this:

auto enXXX
iface enXXX inet static
address 65.108.70.105
netmask 255.255.255.255
pointopoint 65.108.70.65
gateway 65.108.70.65
 
Hy Thalix.

So I have to modify the /etc/network/interfaces on the LXC,
erase its content, and paste your code like :

auto eth0
iface eth0 inet static
address 65.108.70.105
netmask 255.255.255.255
pointopoint 65.108.70.65
gateway 65.108.70.65

?
 
Last edited: