Announcement

Collapse
No announcement yet.

Vms in vbox cannot access internet when configured over pfsense acting as bridge

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Vms in vbox cannot access internet when configured over pfsense acting as bridge

    I'm trying (and so far failing) to use Pfsense inside Virtualbox to act as a router between various VMS and to also act as a network bridge to connect them to the internet.

    My vms can all talk to each other over pfsense. If I set their network adapters to use NAT they can all reach the internet independently of each other. But when connected to the pfsense bridge, nothing can reach the internet. (inlcuding pfsense itself)


    In pfsense settings Network tab I have the following settings:

    Adapter 1:
    • enabled
    • Bridged Adapter
    • my wireless card

    Adapter 2:
    • enabled
    • Internal Network
    • name: Internal LAN


    Someone suggested to muck about with Ubuntu bridge utilities per this page:
    https://www.ubuntupit.com/how-to-con...-ubuntu-linux/


    Before I go mucking about in my network settings and potentially traumatizing myself, is this the right path?

    And if not, what might I do differently?

    Last edited by TwoFistedJustice; Mar 06, 2024, 08:18 PM.

    #2
    I tried a few different things.

    adding a bridge connection via nmcli, using different versions of virtualbox, and changing the dns nameserver entry - all did nothing at all.


    I had a partial success by plugging directly into the physical router with a wire and changing the nic in Virtualbox to use the ethernet adapter instead of the wireless adapter. With this I was able to ping 1.1.1.1 and 8.8.8.8 from pfsense. BUT none of the VMs connected via pfsense could reach the outside.

    Comment


      #3
      I decided to see what would happen in a different OS so I installed the lab kit in Debian 12. Everything worked as expected out of the gate.

      So I'm back to poking around in Kubuntu to see if I can spot anything.

      I have ruled out firewall by turning it off and getting the same result as before.

      I have also ruled out pfsense by installing opnsense and getting identical results.

      Synopsis:
      • VM connected to router internal network = no DNS
      • VM connected to NAT = full internet
      • Works as expected in Debian
      • Identical results with a different virtual router

      Comment


        #4
        Just randomly the whole thing started working. Then stopped. Then started. Then stopped.

        Out of the blue I could get web pages. Then I couldn't. Then I could... you get the idea.

        I used
        Code:
        tcpdump -i myinterface | grep some-url
        on both pfsense inside virtualbox and in my regular terminal to see how far the requests were getting before failing.

        I found that in all cases they were being passed on by pfsense to Kubuntu.

        So I must conclude the intermittent dns failure is in my main OS configuration somewhere.

        I can rule out my physical network because this failure happens on two different laptops, one which I used exclusively at home and the other I use mostly elsewhere. And it happened elsewhere.

        Any ideas on what to check?


        Comment


          #5
          I solved this.

          The answer is to enter the v-router LAN address as the Primary DNS Server via the Setup Wizard.

          Don't enter it in any other window unless you know networking pretty well.

          Comment

          Working...
          X