Time to move to the next step: configuring pfSense, so we can make sure that we are going to have connectivity once we strip our physical NIC from its TCP/IPv4 and TCP/IPv6 stacks. Mind you, in this part I will discuss only the minimal configuration required in order to have Internet connectivity, as this is not a tutorial about advanced pfSense operation. You should refer to the official documentation for that.
- You have installed pfSense. After the VM restarts, click inside the window and then press F1 to boot. Then in the welcome screen type in 1 in order to boot pfSense:
- Setting the virtual LANs. When asked if you want to setup the VLANs type in y and Enter:
- Now, as you can see in the next screenshot, you have to tell pfSense which of the two NICS is the WAN interface and which one is for LAN. In what follows I will set em0 for WAN and em1 for LAN (as that is how we have set the interfaces in VirtualBox at points 4 and 5). If you get mixed up about which one is which, just compare the MAC address displayed by the pfSense installer with that in VirtualBox Manager. Whatever you do, just make sure that the WAN interface is the one bridged to your physical NIC, whilst the LAN interface is the one which is bridged to Microsoft Loopback Adapter:
- Enter the parent interface name for the new VLAN (or nothing if finished): em1
Enter the VLAN tag (1-4094): 20
Enter the parent interface name for the new VLAN (or nothing if finished): em0
Enter the VLAN tag (1-4094): 10
Enter the parent interface name for the new VLAN (or nothing if finished): just press Enter:
Enter the WAN interface name or ‘a’ for auto-detection: em0.
Enter the LAN interface name or ‘a’ for auto-detection: em1.
Enter the Optional 1 interface name or ‘a’ for auto-detection (or nothing if finished): just press Enter.
- You’ll have to confirm the assigned interfaces, so when asked if you want to proceed, type in y and then Enter:
- The system will apply the changes, after which it will display the typical pfSense console. If you didn’t mess up the WAN vs. LAN interfaces, you should be able to see the WAN NIC having an IP assigned from your physical network:
Done! Now you can start doing some basic configuration, such as setting a password, but the real thing is yet to come: the friendly web interface is what is going to be needed in order to configure pfSense.
- If you’ve installed and configured the VM correctly during the previous step, you should now be able to access the web interface. You do that by typing the IP of pfSense’s LAN interface in your web browser (you should be able to reach it, as it is bridged to the Loopback adapter). Ignore any security certificate related warnings:
- In the next window use the default credentials to login in into the administrative interface. User: admin, password: pfsense
- Now you’re in the main window: the dashboard. Update pfSense if needed (also, don’t forget to change your login credentials):
- Click on Services > DHCP Server. Make sure that the check box Enable DHCP server on LAN interface is ticked. The system should have created the default settings for the DHCP service:
- Now you should be good to go. Go to your Network and Sharing Center in Windows, Click on Change adapter settings on the left, then in the main window identify your physical network card and right-click on it (since we talk about a laptop, it is most likely a wireless card, but you can apply further what you’ve learnt in this tutorial and protect all your connections; only don’t forget to add more interfaces in pfSense). Click Properties, and then uncheck the boxes for Internet Protocol Version 6 and Internet Protocol Version 4:
And that is basically it. Open you browser of choice and navigate to whatever page. It should work, although the first time Windows will tell you in Network and Sharing Center that it has no internet connection. Don’t forget, if you want to be completely secure, you need to learn how to configure pfSense. Maybe in the future I will come back with some more tips and tricks on that subject.