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

    need help on pfsense setup on virtualbox

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 1.5k 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.
    • B
      bengregory
      last edited by bengregory

      Hi

      I need help on pfsense setup on Virtualbox, I'm new on this networking thing and I try to learn from the net. I'm not sure if I'm doing this right but this is what I setup so far,

      alt text

      What worked so far

      1. I can access LAN pfSense GUI 172.17.16.15 in PC 1,2,3,4
      2. I can access WAN pfSense GUI 192.168.0.106 only in PC 1-2 but not in 3-4
      3. PC 1,2,3,4 can browse internet and can ping each other

      is my virtualbox setting correct ? What I would like to do is all my devices including pc 3-4 in network go through Virtualbox PFSense Firewall

      How do I do this correctly ? thank you

      NollipfSenseN 1 Reply Last reply Reply Quote 0
      • NollipfSenseN
        NollipfSense @bengregory
        last edited by NollipfSense

        @bengregory See bellow: you should set the virtual machine to bridge adapter which will be it's WAN to pfSense (192.168.0.106/24) and for your LAN, you'll that in bridge on the virtualBox, then when you launch pfSeense, you get to the console and sett LAN IP (#2) to the an address within the WAN network example 192.168.0.211/24. no DCHP...that's how you'lll administer by the Web-GUI of the first VM and repeat for the second VM.

        Screenshot 2022-12-08 at 6.24.00 AM.png

        pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
        pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

        B 1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          You don't want to use 'host only' for those VMs. They should be using 'internal network' as should the pfSense LAN. 'Host Only' is for connecting to the machine hosting VBox, the hypervisor.

          Routing all traffic from PCs 3 and 4 through pfSense will require static routing for them and custom outbound NAT rules to avoid asymmetric routing.
          Really they should be in a separate subnet. So connected to the VBox host via a different NIC or VLAN.

          Steve

          B 1 Reply Last reply Reply Quote 0
          • B
            bengregory @NollipfSense
            last edited by

            @nollipfsense i tried to set both of my virtualbox network adapter to bridge mode and now internet is down

            1 Reply Last reply Reply Quote 0
            • B
              bengregory @stephenw10
              last edited by

              @stephenw10 I have changed my virtualbox setting

              adapter 1 to bridge mode and adapter 2 to internal network

              now i can't access gui from pc3 and 4 and can't ping pfsense and can only access the pfsense gui from pc in the virtualbox

              where should i do the static routing and custom outbound NAT rules..is it in pfsense or my local router ?

              stephenw10S 1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator @bengregory
                last edited by

                @bengregory said in need help on pfsense setup on virtualbox:

                now i can't access gui from pc3 and 4 and can't ping pfsense and can only access the pfsense gui from pc in the virtualbox

                That's good. That's what I expect to happen unless you have added firewall rules to allow it on WAN and routes to the LAN subnet so PCs 3/4 know how to reach it.
                They should be able to access the pfSense GUI on the WAN IP if the WAN firewall rules are passing that.

                Anything you do to make PCs 3 & 4 send their traffic via pfSense is going to be a hack with that network topology. You should have them on a separate layer 2 segment.

                However to do that you would need to set the pfSense WAN as the default gateway on PCs 3 & 4 dircetly. Then you need firewall rules in pfSense to allow traffic from them into the WAN. And you need a custom outbound NAT rule in pfSense to NAT traffic from the WAN subnet to the WAN address. Otherwise you will have asymmetric routing. This would be a really horrible setup! 😉

                Steve

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