HOW-TO: pfSense with Single NIC, VLANS and a Wifi-AP (Router on a Stick)


Recommended Posts

I had to revisit this the other day to help a friend and I have it written up on my blogspot (not going to advertise as I don't really post there anymore). I figured I'd share this for anyone looking to dink around with a Router on a Stick configuration. I had to use this awhile back when I only had one physical PC and still wanted pfSense to have a lot of oversight of my home network / security. Obviously RTR on a Stick is not the best setup, but it'll do in a pinch if you know what you're doing. 👌 Enjoy

 

 


Introduction

 


The current hardware configuration is setup to run on my PC in a virtualized environment using VirtualBox (64bit) for the Win10 Pro (x64) HOST PC.

      System Specifications:
 
Configuration
      VLAN Config(s):
  • VLAN99 (WAN) - DHCP @ ISP
  • VLAN10  (LAN) 192.168.10.1/24 (.5-.254 Range & .2-4 for Static IP Management)
  • VLAN20  (WIFI AP) 192.168.20.1/24 (.5-.254 Range & .2-4 for Static IP Management)
     TL-SG108E Config:
 
***NOTE*** The current firmware on the TP-LINK SG108E will only support one physical "Save Config", anything after that will not be held in the data until they release a firmware fix (**Source link**) - They also indicate here that you can actually flash the v3 firmware to the v2 version (the one I have) although I have elected to not do this. Whichever way, the bug is still persistent in all firmware versions as of 03/05/2018.
 
1.) Connect a laptop and set your IPv4 Address to the following:
 
ipv4.jpg


 
2.) Navigate to: 192.168.0.1 ---> login with usr: admin / pw: admin (I recommend to change these immediately)

3.) Change the IP Settings to what will be your new internal LAN sub-net for easier access. (192.168.10.2 - MGMT Interface - will be setup for easier management access via Ports 4-8 on your Switch).
 
switchconfig.png



 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4.) **DON'T FORGET TO SET IPv4 BACK TO DHCP**

5.) Navigate to VLAN --> 802.1Q VLAN --> Enable VLAN Config --> Apply

 

vlanconfig1.png


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Default VLAN --> Leave as is
  • VLAN ID: 10, VLAN Name: LAN, Port 1 Tagged, Not Member Port 2&3, Untagged Ports 4-8 --> Add/Modify.
  • VLAN ID: 99, VLAN Name: WAN, Port 1 Tagged, Untagged Port 2, Not member 3-8 -> Add/Modify
  • VLAN ID: 20, VLAN Name: OPT1 (Wifi-AP), Port 1 Tagged, Port 3 Untagged, Not Member 2, 4-8

 

6.) Navigate to 802.1Q PVID Setting (and set the following by typing the PVID (10,99,20) and selecting the corresponding ports.)

 

  • Port 1: 10, Port 2: 99, Port 3: 20, Port 4-8: 10

 

config2.png
**Now it's safe to use Save config** If you used it prior to getting all of this setup, then you'll unfortunately need to reset the switch and start over unless they've fixed this bug.
 
7.) Now you can continue to configuring the pfSense Installation. I'd recommend using Rufus if you need to create a bootable USB to proceed. I didn't need to as I virtualized my pfSense router and just downloaded the ISO on my host machine.
 
pfsenseintroscrn.png
pfsensevlansconfig.png
 
8.) Once you get to this step you need to proceed with a "y" and then configure all of the pfSense VLAN Interfaces or any other extra Interfaces needed. This could be skipped and done later manually in the GUI but I'd go ahead and do it here.
          
Your interface(s) may be different than mine.
 
ifaceassignments.png
pfsensevlans.png
pfsenseifcs.png
 
 
  • em1.99 (WAN) -> vlan99
  • em1.10 (LAN) -> vlan10
  • em1.20 (Wifi-AP / OPT1)
  • em0 (OPT2) -> (set on 192.168.30.1/24) Extra virtual interface which will be configured within VirtualBox to be "Virtual NIC Adapter 2" so my HOST PC (pfSense router) can access the internet as it also serves as a HTPC. This may be an unnecessary step depending on your desired configuration.
 
virtnic.png
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9.) Once you set this to your specifications, then you can go into your Network settings and adjust the Virtual Adapter to pull DHCP from the em0 Interface you setup @ 192.168.30.1/24 if you need to pull internet on your VM HOST Machine.
 
Physical Configuration:
  • Switch:P1 -> Phys NIC
  • Switch:P2 -> Cable Modem (ISP) 
  • Switch:P3 -> Wifi-AP (Configured to be 192.168.20.2 for MGMT and Set in AP Mode)
  • Switch:P4-8 -> LAN Ports for any wired devices you may have.
 
 
***Issue(s) with: Realtek PCIe GBE Family Controller NIC***
 
I had to spend hours upon hours trying to figure out why I could not get a WAN IP (DHCP from my ISP). It turns out that the Realtek PCIe GBE Family Controller is known for stripping vlan tags unless you perform the latest driver update, and also add the following registry edits:
  • Update drivers: Realtek PCIe GBE Family Controller
  • Find reg sub-key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}
  • Add/update the following DWORDs:

                  MonitorModeEnabled = 1
                  MonitorMode = 1
                  PriorityVLANTag = 0
                  SkDisableVlanStrip = 1

 

 

Tools:
https://www.wireshark.org/
https://wiki.wireshark.org/CaptureSetup/VLAN

***Issues with websites not resolving and ping requests timing out***

I spent a significant amount of time figuring out why some websites would resolve fine, and others would not. It ended up being that I needed to find the optimal MTU & MSS settings to input in pfSense. (My personal settings are notated below, and in my diagram as well.)

mtu%2526mss.png








 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 Great tutorial on how to find your own optimal MTU & MSS Settings - https://forum.peplink.com/t/how-to-determine-the-optimal-mtu-and-mss-size/7895

This was my first technical write-up ever, and for a portion of my network setup. Here is an overview of the diagram I made as well:

pfsense.jpg


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Old Diagram from 2018, no longer my current network setup) - I change it up pretty regularly.

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I'm so conflicted with the Google Search AI summaries. On one hand I don't like how it's harming smaller websites by greatly reducing traffic which will harm us all in the long run but on the other hand those AI summaries often give me the information I'm after. I have never once clicked on 'show me more' though and never will.
    • Not a single company as small or large it may be is obligated to subsidize its products and sell them at a loss. Your way of thinking is socialist and as a West German with a German brother state but impoverished by state dictatorship and a socialist command economy situated to the East i can tell you - this kind of thinking very quickly leads to products not being produced anymore at all.
    • Apple reportedly has a second-generation iPhone Fold planned for 2027 by Hamid Ganji The iPhone Fold is one of the most anticipated tech products expected to debut this fall. It will be Apple’s first foldable iPhone, ushering in a new product category for the company. While the first generation has yet to hit the shelves, a new leak suggests Apple has already begun work on its successor. Chinese leaker Digital Chat Station claims that the second-generation iPhone Fold has already been confirmed, meaning Apple could launch a successor in fall 2027. The foldable iPhone is also reportedly referred to as the “iPhone Ultra,” though it remains unclear whether Apple will ultimately choose that branding, especially as Samsung is rumored to rename the Galaxy Z Fold 8 as the Galaxy Z Fold Ultra this year. The leaker also claims that the second-generation foldable will feature a wider folding display while reusing the same screen found in the first generation. Apple’s first foldable iPhone is expected to feature a 7.8-inch inner display and a 5.3-inch outer screen in a passport-style form factor. It has already been reported that Apple plans to change its iPhone release cycle in 2026 to spread launches throughout the year. Under this strategy, the iPhone Fold is expected to debut this fall alongside the iPhone 18 Pro and iPhone 18 Pro Max. The standard iPhone 18 and iPhone Air 2 are expected to arrive later in 2026 or in early 2027. Speaking of the iPhone Air, Digital Chat Station says Apple remains undecided about a third-generation model. The company is reportedly waiting to see how the iPhone Air 2 performs in the market, and if sales disappoint, a successor may never materialize. As we reported this week, the iPhone Air has not been scrapped from Apple’s plans. The second-generation model is reportedly scheduled for spring 2027 and could introduce upgrades such as an additional rear camera for ultrawide photography and improved battery life.
    • ahh yes the good old your opinion differs from mine so you are therefore insane lol destiny 1 had no agenda pushing and was a massive success of a game, if you clearly look online the team for some reason thought they had too many men on the team and went on a woman and dei recruitment drive and we all know how destiny 2 performed from then on in
    • The limited imaginations and business acumen of non-dominant players is simply that: the abject lack of creative business acumen. Businesses often want to operate in a financially-rewarding marketplace (free market economics) and/or exit/cash-out at maximal financial recompense. Money is their incentive; regulations are both their obstacles and their tools; politics is their means of influencing the marketplace. Google, in this story's example, is crying that AWS and Azure are "too dominant" -- cuz Google Cloud is not printing as much money as Alphabet wants (although it is still dramatically more than they actually need). The EU DMA should truly follow-the-money and treat the EU as its own sovereign nation in order to protect European market players: Domestic entities are exempt from market-influence regulations until absolute monopoly is achieved; Foreign (non-EU/non-Euro) entities are all regulated via stricter DMA measures whereby regulated partnership with independent domestic entity becomes the only way for foreign entities to 'tip the scale' for favorable financial remunerations. Basically create a dual-track aligning with China's foreign investment models. In my eyes, this is the only way to properly protect the European marketplace beyond the current dot-com/ai-bubble/social-media crazes.
  • Recent Achievements

    • One Year In
      Vistor earned a badge
      One Year In
    • First Post
      kinowa earned a badge
      First Post
    • Rookie
      krychek57 went up a rank
      Rookie
    • Grand Master
      Jaybonaut went up a rank
      Grand Master
    • One Year In
      Philsl earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      406
    2. 2
      +Edouard
      172
    3. 3
      PsYcHoKiLLa
      131
    4. 4
      Xenon
      72
    5. 5
      Michael Scrip
      69
  • Tell a friend

    Love Neowin? Tell a friend!