This is how to create your own SysAdmin Lab with VMs of operating systems of your choice. How to configure the operating system's network interface cards outside of VirtualBox's configuration will not be covered here.
Requirements
Oracle VM VirtualBox
pfSense Netgate
At least 2 other VMs of an operating system of your choice
Network Diagram
As you can see from the diagram, this configuration involves only two VMs (three if you count pfSense but we're using that as a router). However, you don't have to limit your setup to that. Pfsense will be limited to 4 network interface cards in virtualbox so you could have 4 different vlans and divide a bunch of vms between them. This is just to get you started.
VirtualBox Configuration Procedure
Download Oracle VM VirtualBox if you don't already have it installed, and install it.
Download pfSense AMD64 ISO IPMI/Virtual Machines from pfsense.org downloads.
Download the operating system ISOs of your choice.
Open virtualbox
Click the Machine tab at the top.
Click new
Name it Router
In the "ISO Image:" field, click the downward arrow and then click "other" to browse for the .iso file.
In the type field should be linux
The Version field should be ubuntu 64bit.
Click Next
Put the memory at about a quarter or less of what your system memory is, unless you have a ridiculous amount of memory then just put it at 3 or 4 Gigs. If you notice it's slow later, shut the machine down and increase it.
Give it 2 processors.
Click Next
Give it 20 Gigs of hard drive
After its created, click on the machine and click settings.
Go to Network
Adapter 1 should have "Enable Network Adapter" checked and "Attached to:" "NAT"
Adapter 2 should have "Enable Network Adapter" checked and "Attached to:" "Internal Network"
In the "Name:" field type "vlan1"
Adapter 3 should have "Enable Network Adapter" checked and "Attached to:" "Internal Network"
In the "Name:" field type "vlan2"
Create two other VMs with operating systems of your choice.
Name the first VM "Operating System 1"
After it's created go to the Network Settings, enable adapter 1, attach it to internal network, and name it vlan1.
Name the second VM "Operating System 2"
After it's created go to the Network Settings, enable adapter 1, attach it to internal network, and name it vlan2.
pfSense configuration procedure
Start "Router" VM
It should load past the logo and ask you to accept the Copyright and Distribution Notice
Hit enter to Accept
Enter to Install pfSense
Enter on en0 for WAN interface
Enter to "Proceed with the installation"
Enter on en1 for LAN interface
Enter on VLAN Settings
Press down arrow and enter to change "Enable Vlan" to "YES"
Move cursor to "continue" and press enter
Move cursor to "IP Address" and press Enter
Change IP address to 192.168.0.1/24 press enter
Move cursor to "DHCP Range start" and press enter
Change to 192.168.0.2 and enter
Move cursor to "DHCP Range end" and press enter
Change to 192.168.0.5 and enter
Continue with installation.
At the "Interface Assignment and Configuration" Screen select "Assign/Configure"
Select en2
Enter on VLAN Settings
Press down arrow and enter to change "Enable Vlan" to "YES"
Move cursor to "continue" and press enter
Move cursor to "IP Address" and press Enter
Change IP address to 192.168.1.1/24 press enter
Move cursor to "DHCP Range start" and press enter
Change to 192.168.1.2 and enter
Move cursor to "DHCP Range end" and press enter
Change to 192.168.1.5 and enter
Continue with installation.
Select continue on the "Interface Assignment and Configuration" Screen
Wait
Press Enter to continue on the Installation Options screen
Press Enter at Disk Selection screen
Select Yes to confirm
Wait
Select Current Stable Release
Wait for a while for it to install
Press enter on "OK" when done
Select reboot
While rebooting or shutdown, at the bottom of the VM window right click the CD icon next to the hard drive icon.
Click remove disk from virtual drive
Wait for pfSense to boot or click start and wait
You should see your wan port IP address and lan port IP addresses.
Enter option 14
Enter Yes
Install Operating System 1 and 2 VMs
Verify Operating System 1 can reach the pfSense web gui
log in with username admin | password pfsense
Comments