Setting up a lab has many advantages and benefits when it comes to do some researches and testing. Being able to virtualize any machine is a big opportunity, you can create many systems without spending a lot of money. You can monitor and control your infrastructure as if you were in a small company. Testing things and doing researches are always better to do it in a development environment than in production. Therefore as a cybersecurity engineer or software engineer or network engineer, it is always good to have a lab to do some testings.
Here is the lab we are going to create, it will be the foundation and others systems can be added later to create a more advanced lab :
From this point, you have retrieved the .iso file, it's time to create a new virtual machine on VMware.
Follow the instruction by giving a name to your virtual machine, add the .iso file etc. About the configuration of the VM, you don't need a lot of power to run pfSense.
Then follow the instructions and make sure to have 2 network adapters displayed on the menu of pfSense.
To be sure that the network interfaces are correctly configured, check your networking settings on VMware and find the MAC address of each network adapter.
When you have retrieved the MAC address of each network interface, go to pfSense and assign each interface to the correct network. Assigning the interface, you will see the MAC address of each interface and in case you forget which interface belongs to which network adapter, you can compare it with the MAC address you've retrieved from the VMware network settings.
Once you have set up the correct interface for the WAN and LAN then you should be able to ping your own system. If you have set up the WAN network interface of your pfSense as NAT, you can check the NAT gateway in the advanced network settings in VMWare.
After configuring the interfaces, make sure you can ping the NAT gateway, and internet to check if everything works well.
Your Firewall has been installed. Then, it is necessary to configure it by adding some firewall rules to control your network traffic.
In this lab, the operating system for the active directory is Windows Server 2012 R2. Create a new virtual machine and change the network adapter settings to put it in the private network. After installing the Windows Server, we need to install some windows features and roles for Active Directory.
First let's use a static ip address for the server, an Active Directory is a DNS server, and many systems must communicate with the DNS server to join the domain or to request any DNS query.
When the static IP address has been set up, and the default gateway IP address is the Firewall's IP address, check your connection. You should be able to ping the firewall and also ping google.com. If this is not the case, please check the firewall rules by connecting to the web interface of pfSense.
First role and feature to add will be the DNS server, Active Directory works with DNS. To add a feature, get on the dashboard and click on "Add role and features".
Then select your server, and click on DNS server for the role you want to add to the Windows server. About the features, we can let it by default on this installation.
Once the DNS server is installed, you can proceed to install the Active Directory Domain Services.
After the installation, promote the server as a domain controller and you're done with the installation of the Active Directory.
This part will show you how to join a windows system in the Active Directory. There is nothing complicated in the process but there are key points to be aware:
To join the domain, go to system, click on advanced settings, click on the button "modify" to change the computer domain and enter the domain name.
Then, you will be asked to enter the credentials of a domain admin. Once done that, you will finally have a message saying that your system has been correctly integrated.
This is the foundation of the lab. From there, you can add any system to increase the complexity, for example, I plan to add a squid proxy, sysmon and a siem such as splunk or ELK to gather the logs of different systems.