Home Lab With Pfsense & VMware Workstation - OutsideSys
Home Lab With Pfsense & VMware Workstation - OutsideSys
Home Lab With Pfsense & VMware Workstation - OutsideSys
Introduction
I wanted to build a virtual lab environment at home that would emulate an office environment. My requirements were to have
separate network segments for Clients & Servers, and two DMZ networks. I also wanted my home network, which is external to the
virtual lab environment, to emulate the Internet, even though it really isn’t.
VMware Workstation has a feature called LAN Segments. LAN Segments are a great way to create private virtual networks for any
number of uses, but keep in mind that you cannot use Workstation’s DHCP features with LAN Segments.
This means you become responsible for defining a LAN segment’s IP addressing by configuring static IPs on the VMs connected to the
segment, and if you want to connect multiple LAN segments together, you need a VM that can provide routing between the LAN
segments.
The following is how I created multiple “named” LAN segments within VMware Workstation, and routed between them using a VM
running pfSense, which is an open source firewall.
My lab PC is a tower with a single physical NIC connected to my home network (Home-Net), which uses an address space of
192.168.199.0/24.
I reserved 192.168.199.101 – 192.168.199.110 for my lab environment to use as external “public” IPs, and I made sure my Home-
Net DHCP service was not giving out IPs in that range.
When creating the VM for the pfSense firewall, the first virtual NIC (vNIC) will be “bridged” to Home-Net. After installing pfSense, this
vNIC will be configured as pfSense’s WAN interface, and given the following settings:
The upstream gateway is the router/firewall shown in the Home Network section of the above diagram. This configuration allows lab
VMs to access the Internet through the pfSense firewall. All network traffic leaving the lab that is not assigned a NAT IP within pfSense
will get sent out using the IP of the WAN interface (PAT).
The below table outlines the IP address plan for each of the lab’s network segments, and includes the pfSense interface names along
with the IP addresses that will be assigned to each pfSense interface. The first row shows pfSense’s WAN interface, which as discussed
above, will be bridged within VMware Workstation to Home-Net.
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 1/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
Segment NameSegment Network Interface NameInterface IP
Servers 10.1.2.0/24 em2 -> OPT1 10.1.2.1
DMZ1 10.1.5.0/24 em3 -> OPT2 10.1.5.1
DMZ2 10.1.6.0/24 em4 -> OPT3 10.1.6.1
Download pfSense
Download the latest pfSense full installer:
If needed, use 7-Zip to extract the ISO from the archive file.
Click on the LAN Segments button, add the following segment names, and click OK.
Clients
Servers
DMZ1
DMZ2
Custom (Advanced)
Hardware Compatibility: Workstation 10.x, Workstation 11.x, or Workstation 12.x
Processors
Number of Processors: 1
Number of Cores per Processor: 1
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 2/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
Sound Card: Remove
Install pfSense
Note: After installing pfSense and doing the initial configuration, these instructions finish the configuration via the pfSense web
portal. To follow along, you will need a Windows or Linux VM so you can connect to the web portal with a browser (Firefox, Chrome,
Edge, etc.).
Keymap Selection (“Standard US” is the default). If needed, choose a Keymap, then Select [Enter]
Partitioning: Auto (UFS) Guided Disk Setup
Manual Configuration: NO
Reboot
Disconnect the ISO image file from the CD/DVD drive while rebooting, and wait for the prompt to configure the WAN interface (em0).
After assigning the WAN interface, pfSense will configure itself. When it’s done, you’ll be presented with a list of options. Directly
above the list you’ll see the configuration for the WAN interface. If you have DHCP enabled in your home network, the WAN interface
will get an IP address, but we will assign a static IP later.
Enter an Option: 6
pfSense will shutdown and halt system. This may take a few minutes, depending on
your hardware.
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 3/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
Finish
Make sure the new network adapter is selected, and make the following changes:
Select: LAN Segment (radio button)
Click OK
Repeat adding a new vNIC for the Servers, DMZ1, and DMZ2 LAN Segments.
When you’re done, you should have documentation that shows each vNIC’s MAC address associated with a LAN Segment name. You
want this in case things get confusing when setting up each vNIC in pfSense. Here’s an example:
Assign Interfaces
Enter an option: 1
Note the listing of interface names and their MAC addresses. They should match up accordingly.
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 4/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
Note: If you’re building your lab in a laptop that will be connecting to various networks, you’ll want to skip this step, and just let the
WAN interface get its IP address configuration from DHCP. You will also want to change the VM’s vNIC setting from Bridged to NAT.
Enter an option: 2
Enter the new WAN IPv4 address. Press <ENTER> for none:
> 192.168.199.101
Subnet masks are entered as bit counts (as in CIDR notation) in pfSense.
e.g. 255.255.255.0 = 24
255.255.0.0 = 16
255.0.0.0 = 8
For a WAN, enter the new WAN IPv4 upstream gateway address.
For a LAN, press <ENTER> for none:
> 192.168.199.1
Enter the new WAN IPv6 address. Press <ENTER> for none:
> <ENTER>
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 5/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
You should now see the following above the list of options:
Enter an option: 2
Subnet masks are entered as bit counts (as in CIDR notation) in pfSense.
e.g. 255.255.255.0 = 24
255.255.0.0 = 16
255.0.0.0 = 8
Enter the new LAN IPv4 subnet bit count (1 to 31):
> 24
For a WAN, enter the new LAN IPv4 upstream gateway address.
For a LAN, press <ENTER> for none:
> <ENTER>
Enter the new WAN IPv6 address. Press <ENTER> for none:
> <ENTER>
You should now see the following above the list of options:
The IP address for the LAN interface becomes the URL for the web management portal (webConfigurator).
Switch to a Windows or Linux client VM that has its vNIC assigned to the Clients LAN Segment, and configure the OS with an IP and
mask on the same network. For example:
IP Address: 10.1.1.15
Mask: 255.255.255.0
Gateway: 10.1.1.1
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 6/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
Open a browser, and enter: http://10.1.1.1
User: admin
Pass: pfsense
First time logging in? pfSense has a wizard that you can go through. I prefer to skip this by clicking on the logo in the top-left corner.
In the pfSense VM settings, make sure the MAC address of the Clients vNIC matches up to the MAC address shown for the em1
interface.
In the pfSense console, use option 1 and/or 2 to reconfigure the WAN & LAN interfaces.
Make sure the vNIC for the Windows/Linux client VM is assigned to the Clients LAN Segment.
If needed, start over by shutting down the pfSense VM, opening the VM’s settings, and re-adding all of the vNICs, or try
generating new MAC addresses for each vNIC.
NTP Time Server: [Leave the default, or enter your favorite NTP pool of servers]
Save
Search for Open-VM-Tools (click the + Install button, and the Confirm button to install)
Wait for the Success message in the log window before continuing.
Edit the admin account and set your own super-secret password.
Diagnostics > Reboot
Description: Clients
Save
Enable Interface
Description: Servers
Enable Interface
Description: DMZ1
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 7/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
IPv4 Configuration Type: Static IPv4
Enable Interface
Description: DMZ2
Save
Apply Changes
These rules are configured with a lab environment in mind. By default, pfSense allows anything connected to its LAN interface (Clients
LAN Segment) to access the WAN (Home-Net & Internet), and all of the other network segments.
We will create rules that can block the Clients network segment from accessing the WAN and other networks, but we will leave them
disabled. They will be there just in case it’s needed.
We will also allow any Home-Net IP address to ping the WAN address. This can help with troubleshooting.
Click the “Add Rule to the end of the list” button to add a new rule
Action: Pass
Interface: WAN
Protocol: ICMP
Save
Click the Garbage Can icon in the “IPv6 *” Default allow LAN to any rule to delete it.
Click the “Add rule to the top of the list” button to add a new rule
Action: Block
Disabled: Disable this rule
Interface: CLIENTS
Protocol: Any
Save
Click the Copy icon in the rule you just created to create a new rule based off of that rule.
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 8/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
Destination Type: DMZ1 net
Save
Click the Copy icon in the rule you just created to create a new rule based off of that rule.
Save
Click the Copy icon in the rule you just created to create a new rule based off of that rule.
Save
Click the “Add rule to the top of the list” button to add a new rule
Action: Block
Interface: SERVERS
Protocol: Any
Save
Click the Copy icon in the rule you just created to create a new rule based off of that rule.
Save
Click the Copy icon in the rule you just created to create a new rule based off of that rule.
Save
Click the Copy icon in the rule you just created to create a new rule based off of that rule.
Save
Click the “Add Rule to the end of the list” button to add a new rule
Action: Pass
Interface: SERVERS
Protocol: Any
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 9/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
Save
Click the “Add rule to the top of the list” button to add a new rule
Action: Block
Interface: DMZ1
Protocol: Any
Save
Click the Copy icon in the rule you just created to create a new rule based off of that rule.
Save
Click the Copy icon in the rule you just created to create a new rule based off of that rule.
Save
Click the “Add Rule to the end of the list” button to add a new rule
Action: Allow
Interface: DMZ1
Save
Open a command prompt on your lab computer, and try to ping the IP address of the pfSense WAN interface: 192.168.199.101
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 10/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
Note: If you built your lab in a laptop, and you configured the pfSense WAN interface to get its IP configuration using DHCP, be careful
with your choice of virtual IPs. You don’t want to cause an IP conflict on the external network.
Type: IP Alias
Interface: WAN
Save
Apply Changes
You’re going to map the external Home-Net virtual IP address you created above to the IP address of the internal lab VM.
Apply Changes
This rule will allow you to ping the internal lab VM using the external Home-Net virtual IP address you configured above.
Click the “Add rule to the top of the list” button to add a new rule
Action: Pass
Interface: WAN
Address Family: IPv4
Protocol: ICMP
Save
Apply Changes
Summary
At this point, you’ll want to build some servers and clients to use the LAN Segments you configured in VMware Workstation.
Assuming you’re starting from scratch, and you have a well equipped computer for your lab, here’s a list of things to consider building:
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 11/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
Windows Domain Controllers or Linux Samba servers configured as DCs.
A Web server in DMZ1 to show off your JavaScript, PHP, and HTML5 skills.
A Microsoft Exchange 2013 environment with a CAS proxy server in DMZ1.
A Microsoft Lync 2013 environment with an Edge server using DMZ1 & DMZ2.
A reverse proxy server using DMZ1 & DMZ2 in front of a Microsoft SharePoint environment.
Add another LAN Segment to VMware Workstation, and use it for replication between a cluster of Exchange mailbox servers or
Microsoft SQL 2014 servers.
Search.. Search
Categories
Select Category
Recent Posts
ADCS – Manage PKI Certificate
Templates
Related Posts
Format VMFS to Change Block Size
Tag Cloud
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 12/13
12/7/2018 Home Lab with pfSense & VMware Workstation | OutsideSys
https://itpro.outsidesys.com/2015/02/19/home-lab-with-pfsense-workstation/ 13/13