-1

I am a bit lost regarding my kvm setup.

I rented a root server at hetzner.de and now wanted to setup virtualization using libvirt & kvm. I created a bridge br0 which now holds the static server ip (instead of the default interface enp2s0). Linking a /29 subnet to the bridge and assigning a static ip to the guest went fine. Now I can reach it from the outside using the static ip, but can't fetch packages nor ping nameservers. So pinging 8.8.8.8 works fine, whilst pinging google.com answers with:

Temporary failure in name resolution

Here are the routes of the host(here and in the following text i replaced the first octave with 255)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         255.251.246.1   0.0.0.0         UG    0      0        0 br0
255.9.179.64      0.0.0.0         255.255.255.255 UH    0      0        0 br0
255.9.179.65      0.0.0.0         255.255.255.255 UH    0      0        0 br0
255.9.179.66      0.0.0.0         255.255.255.255 UH    0      0        0 br0
255.9.179.67      0.0.0.0         255.255.255.255 UH    0      0        0 br0
255.9.179.68      0.0.0.0         255.255.255.255 UH    0      0        0 br0
255.9.179.69      0.0.0.0         255.255.255.255 UH    0      0        0 br0
255.9.179.70      0.0.0.0         255.255.255.255 UH    0      0        0 br0
255.251.246.0   0.0.0.0         255.255.255.224 U     0      0        0 br0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 bro0

Result of brctl show:

bridge name     bridge id               STP enabled     interfaces
br0             8000.448a5b5dd0f1       no              enp2s0
                                                        vnet0
bro0            8000.52540006b883       yes             bro0-nic

ifconfig on host:

br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 255.251.246.11  netmask 255.255.255.224  broadcast 255.251.246.31
        inet6 255::468a:5bff:fe5d:d0f1  prefixlen 64  scopeid 0x20<link>
        ether 44:8a:5b:5d:d0:f1  txqueuelen 1000  (Ethernet)
        RX packets 51679  bytes 3634682 (3.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 90348  bytes 7395186 (7.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bro0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:06:b8:83  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 44:8a:5b:5d:d0:f1  txqueuelen 1000  (Ethernet)
        RX packets 104449  bytes 7981272 (7.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 89828  bytes 8144371 (7.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 2  bytes 190 (190.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 190 (190.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 255::fc54:ff:fe94:8198  prefixlen 64  scopeid 0x20<link>
        ether fe:54:00:94:81:98  txqueuelen 1000  (Ethernet)
        RX packets 1172  bytes 110476 (107.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5399  bytes 321838 (314.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

and ifconfig of the guest

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:94:81:98 brd ff:ff:ff:ff:ff:ff
    inet 255.9.179.65 peer 255.251.246.11/32 brd 255.9.179.65 scope global ens2
       valid_lft forever preferred_lft forever
    inet6 255::5054:ff:fe94:8198/64 scope link
       valid_lft forever preferred_lft forever

At the moment I haven't setup any type of firewall. I wanted to test out the connections etc. without getting interfered by it. Now I am thinking that this might be the problem. Could be a problem with masquerading..

Help is appreciated!

Cheers, Tobi

2
  • What is in /etc/resolv.conf? Feb 27, 2019 at 12:59
  • @MichaelHampton Thank you! I forgot editing the nameservers..
    – Tobi
    Feb 27, 2019 at 13:27

1 Answer 1

0

Thanks to @MichaelHampton I got it working. I forgot to update the nameservers in the guest under /etc/resolv.conf. Inserting the hosters nameservers solved my problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .