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

Help on how to setup pfsense as a wireless AP/FW/router in virtual box

Scheduled Pinned Locked Moved Virtualization
15 Posts 3 Posters 17.1k 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.
  • H
    hching
    last edited by Jul 20, 2013, 1:25 PM

    Hi kejianshi,

    Many thanks for the reply.  No, I wouldn't assume I have done a good job at trouble shooting.  Routing and network has been one of my many weaknesses and I have not been exposed to pfsense until few weeks ago.  I am at most a pro-sumer.

    Regarding DNS servers settings, using OpenDNS, I have tried the following:

    1. setting it up at pfsense:System:General Setup:DNS Servers: 208.67.222.222, gateway=none
    2. setting it up at the client (e.g. Windows:IPv4 Properties:General:Preferred DNS server addresses:208.67.222.222)

    The results are the same.  The LAN:bridge0 interface offered a valid IP address but gave a time-out when I ping www.google.com.  No internet traffic gets through.  The OPT1:192.168.22.x interface just works.

    As a side note, before I bridged, on OPT2:Wlan0 offered a valid IP through its DNS server.  I can't connect to the internet but when I ping www.google.com, I would get:

    PING www.google.com (74.125.128.147) 56(84) bytes of data.
    timeout…..

    So it did a bit better as www.google.com was resolved to a valid external IP address, but then got stuck somewhere.

    Unfortunately, every time I try to bring wlan0 to an interface, it seems to cause problems exchanging traffic to the outside world.

    I thought about bridging the eth1 and wlan0 on Wheezy first before passing it as one interface (say br0) to pfsense through virtual box.  However, even if it works, it's less than ideal because it is one less interface pfsense can manage and further reduces the role pfsense can play in this set up, I think...

    1 Reply Last reply Reply Quote 0
    • K
      kejianshi
      last edited by Jul 20, 2013, 3:36 PM Jul 20, 2013, 2:56 PM

      I'm pausing because I'm wondering if there isn't a better way to do what you are trying to do with the hardware you have in hand.  I have a habit of NOT virtualizing pfsense unless its unavoidable and going ahead and virtualizing everything else.  I've just had less headaches that way.
      If every OS and every client I had was running in a VM, pfsense is the one thing I'd try to keep on hardware.
      But I don't know how much hardware you have or how many client OS you must support.

      That said, I do see people here talk of some success with virtual box.

      My feeling is that if you want a pfsense VM to be able act as router for some other VMs on the same physical box, thats easy enough.  But when you start trying to get pfsense to ALSO act as router to some external physical machines or wifi APs, I really start thinking you need a different hypervisor than virtual box.  Something that can take exclusive control of physical NICs and hand it over to pfsense. (I'm no virtual box expert though).

      I think v-sphere might do a much better job when you start talking about pfsense needing to manage a mix of virtual and physical clients.

      1 Reply Last reply Reply Quote 0
      • H
        hching
        last edited by Jul 20, 2013, 4:51 PM

        Hi kejianshi,

        Thanks again for this.  This full size computer used to be my linux server for printing, mail,  ftp, ldap, simple routing (as a dual stack (IPv6/IPV4) router connected with a switch), web, cloud storage and media center but I re-purposed it in favor of a lower power mini ITX setup.  So I am really just experimenting and trying to push things a bit of how far things can go.

        I wanted to pursue this route because I felt it is a flexible/easily scalable implementation.  I used to have routers running DD-WRT and hacked them to do all/some of the above but I ended up with many special purpose network devices and it became very cumbersome to manage.  It also became more expensive from a hardware and learning point of view as I found myself having to learn many different slightly different systems.  Performance also suffered because none of these boxes can give me real time data encryption quite like a current generation desktop cpu running say linux when moving large files through SATA or USB3.0 connected hard drives.

        As such, I want to replace as many physical devices using VMs as possible.   I understand keeping pfsense (router) separate is superior because my network will not go down along with my computer but at this point I am willing to make the trade off. The VMs make it very easy to backup and restore.

        Back on topic, to answer your question, I intend to connect less than 10 devices (including TVs, game consoles, etc) to this setup, if I get it to work without breaking things too much.

        I feel I am getting quite close. pfsense is already talking to the two physical NICs and the virtual network.  The problem really is with wlan0 which is "translated" by virtualbox as just another wired NIC to pfsense, and pfsense has already managed to assign IPs to machines that are connected to this interface (bridged or unbridged).  I feel that I am just missing something obvious to get internet working due to inexperience… haha..  As I have time, I will continue to experiment with it and try to learn a bit more about virtual machines and pfsense.

        Failing everything, one option is to buy a simple wireless switch to connect to my LAN facing NIC.  I need to get more ports anyway.   I will also look at v-sphere.  I know nothing about it at this point.

        BTW, would you have any good suggestions if I want to learn how to analyze and trouble shoot network problems as a beginner? Should I learn how to analyze packets to trouble shoot things such as this?

        1 Reply Last reply Reply Quote 0
        • K
          kejianshi
          last edited by Jul 20, 2013, 5:22 PM

          Ohhhh.
          Ummmmm….  Google?

          1 Reply Last reply Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator
            last edited by Jul 22, 2013, 1:36 PM Jul 22, 2013, 1:33 PM

            "I will also look at v-sphere."

            So this box id going to be your VM host?  Then yeah I would run esxi (vsphere) over virtualbox for sure!!

            As to your wifi issue - just get a wireless router and use it as AP, any wireless router will do…  Don't you have one laying around?  What did you do for your router before?

            I run my whole network off a VM pfsense on esxi box..  Router on vm for your physical network works great, there is little reason not to do it if you ask me..  And would be the 1st thing I would visualize not the last ;)

            The LAN nic on my isxi host is connected to my physical switches, and both real and vms have access to the internet through pfsense vm.  I also have wlan on its own segment where pfsense is firewall between wlan segment and lan and internet and even a dmz segment that is vm access only through pfsense.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • K
              kejianshi
              last edited by Jul 22, 2013, 1:40 PM

              Minus the difference of opinion about virtual vs physical firewall, if you are already running pfsense in vsphere to manage both virtual and physical clients, you would probably be the perfect person to walk hching through it.

              I MIGHT even consider doing it at 1 location because no one is there to fix anything if something should break so I do have an interest in running the least amount of hardware possible.  (Its the middle of nowhere)

              1 Reply Last reply Reply Quote 0
              • J
                johnpoz LAYER 8 Global Moderator
                last edited by Jul 22, 2013, 3:11 PM

                Sure happy to walk you through it

                Here is a basic diagram of how it would be setup in the most basic mode - 2 nics in your physical host. 1 to your internet (wan) other to physical lan (lan).

                You could clearly get fancier with it - break out your vmkern port group to its own phy nic.  More nics in the host could allow you to breakout your wlan to its own physical segment, dmz or other firewalled segments.

                Or you could also use vlans to run your different segments between vm and phy over just 1 physical nic.  Inside the host you could add as many vswitches or portgroups to breakout vlans, etc.

                Other pic is my current vswitches in my esxi host.  See how pfsense is tied to wan, lan, wlan and dmz.

                example.jpg
                example.jpg_thumb
                esxiswitches.png
                esxiswitches.png_thumb

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                1 Reply Last reply Reply Quote 0
                • K
                  kejianshi
                  last edited by Jul 22, 2013, 3:13 PM

                  So much more sane than virtual box.

                  1 Reply Last reply Reply Quote 0
                  • J
                    johnpoz LAYER 8 Global Moderator
                    last edited by Jul 22, 2013, 3:47 PM

                    Virtualbox is more for running a VM on your PC to test something, etc.  I would not use it for setup like this.  Its great if you want to fire up another copy of windows or linux to test something or run some questionable code or visit a questionable site, etc.

                    You could set it up to work sure - but its much easier in something like esxi, which is FREE as well.

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                    1 Reply Last reply Reply Quote 0
                    • K
                      kejianshi
                      last edited by Jul 22, 2013, 4:00 PM

                      I do plan to set up pretty much exactly what you have laid out here in at least one place.  Eventually.  Perhaps after a stable release of 2.1 when I will be forced to visit that place again.

                      1 Reply Last reply Reply Quote 0
                      • J
                        johnpoz LAYER 8 Global Moderator
                        last edited by Jul 22, 2013, 4:27 PM

                        Oh so your waiting for 2.1 to release before you setup the VM environment.

                        Not sure what sort of access you have to this location.  But if make sure you can access the esxi host.. You could set it up now and then just update to 2.1 final.. If any issues you could correct remotely, etc.

                        An intelligent man is sometimes forced to be drunk to spend time with his fools
                        If you get confused: Listen to the Music Play
                        Please don't Chat/PM me for help, unless mod related
                        SG-4860 24.11 | Lab VMs 2.8, 24.11

                        1 Reply Last reply Reply Quote 0
                        • K
                          kejianshi
                          last edited by Jul 22, 2013, 5:00 PM

                          No physical access except by long plane ride.

                          1 Reply Last reply Reply Quote 0
                          15 out of 15
                          • First post
                            15/15
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                            This community forum collects and processes your personal information.
                            consent.not_received