KVM has no Internet?
-
Hello, I'm running pfSense as a KVM on hypervisor VMM 4.0.0.
I just installed another KVM Debian 12 Bookworm.
I can ping the LAN and could ping the WAN with DHCP.
Debian was on DHCP, but I changed /etc/network/interfaces to static so I can install ZoneMinder on Debian.
Anyway, here's my code as per the Debian Wiki to make a static IP.
Perhaps I'm just missing some DNS servers, but I thought the routing via the KVM router pfSense would manage the DNS?
Here's the KVM Debian terminal output below:root@debian:~# ip -c a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 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 noprefixroute valid_lft forever preferred_lft forever 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 52:54:00:e6:d2:1d brd ff:ff:ff:ff:ff:ff inet 192.168.1.146/24 brd 192.168.1.255 scope global enp1s0 valid_lft forever preferred_lft forever inet6 fe80::5054:ff:fee6:d21d/64 scope link valid_lft forever preferred_lft forever root@debian:~# traceroute netgate.com traceroute to netgate.com (199.60.103.4), 30 hops max, 60 byte packets connect: Network is unreachable root@debian:~# cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto enp1s0 iface enp1s0 inet static address 192.168.1.146/24 gateway 192.168.1.170/24
-
@eiger3970-0 DHCP can hand out DNS but if the device is using a static IP, DNS needs to be specified.
You can verify connectivity using an IP … ping 8.8.8.8 for example since it’s pingable.
-
@SteveITS yes, did the ping 1.1.1.1 and connected with DHCP, but now with the static IP, only pings LAN at 192.168.1.160, but not ping 1.1.1.1.
-
-
@viragomann pfSense configuration is mentioned in 1st post, 1st line.
Host terminal output:linuxmint@linuxmint:~$ ip r default via 192.168.1.170 dev br0 proto static metric 425 169.254.0.0/16 dev br1 proto kernel scope link src 169.254.166.196 metric 426 169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown 192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.120 metric 425 192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 224.0.0.0/4 dev br1 proto static scope link metric 426
KVM Debian terminal output:
root@debian:~# ip r 192.168.1.0/24 dev enp1s0 proto kernel scope link src 192.168.1.146
-
@eiger3970-0
So the Debian is obviously missing the default route.The gateway in in the network config file should not be stated in CIDR notation. The mask is already given by the IP. So try to remove it from the gateway.
-
@viragomann Duh, 'obviously'!
Well, thanks, now the Debian KVM can ping the WAN via the KVM router.