Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    KVM has no Internet?

    Scheduled Pinned Locked Moved Virtualization
    7 Posts 3 Posters 744 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      eiger3970 0
      last edited by eiger3970 0

      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 
      
      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @eiger3970 0
        last edited by

        @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.

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote 👍 helpful posts!

        E 1 Reply Last reply Reply Quote 1
        • E
          eiger3970 0 @SteveITS
          last edited by

          @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.

          V 1 Reply Last reply Reply Quote 0
          • V
            viragomann @eiger3970 0
            last edited by

            @eiger3970-0
            What does the routing table look like?

            ip r
            

            What is the pfSense network configuration?

            E 1 Reply Last reply Reply Quote 1
            • E
              eiger3970 0 @viragomann
              last edited by

              @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 
              
              V 1 Reply Last reply Reply Quote 0
              • V
                viragomann @eiger3970 0
                last edited by

                @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.

                E 1 Reply Last reply Reply Quote 1
                • E
                  eiger3970 0 @viragomann
                  last edited by

                  @viragomann Duh, 'obviously'!
                  Well, thanks, now the Debian KVM can ping the WAN via the KVM router.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.