Creating a pfSense virtual machine

Here is an example of how to set up a virtual machine with pfSense in the Yandex Cloud infrastructure.

  1. The first step is to create a virtual machine. The configuration will be done through the Yandex Cloud web interface (see Figure 1).

Figure 1. Virtual machine creation

The user specifies the name of the virtual machine and defines the Availability zone. If necessary, it is possible to add Labels and Description of the virtual machine.

  1. Next, select the pfSense image from the Marketplace (see Figure 2).

Figure 2. Select the PfSense Image

  1. The user should then define the disk size according to the needs or leave the default value (see Figure 3).

Figure 3. Setting the Disk Size

Also, the user can select the type of disk based on the options offered.

  1. The amount of RAM and processor cores also depends on the user’s preferences and fits their specific tasks. We left the default values (see Figure 4).

Figure 4. Setting the RAM and Processors

  1. Network settings
⚠️
The number of network interfaces can only be set during the virtual machine creation process. Once the virtual machine has been created, it is not possible to add new network interfaces or delete existing ones. Suppose the user needs to change the number of network interfaces on an already-created virtual machine. In that case, they can use the snapshots or disk images functionality to create a copy of the VM and specify the required number of network interfaces during the VM creation process.

Select the appropriate subnet for the WAN interface. The settings can be unchanged, but the subnets mustn’t overlap (see Figure 5).

Figure 5. Network Settings

The next step is for the user to add an additional interface that will act as a LAN and serve as a gateway for private networks (see Figure 6).

Figure 6. Adding Network Interface

  1. Now the user can set a username for SSH and provide a public key. In this case, it is sufficient to specify the user “freebsd”. Then click on the “Create Virtual Machine button”. The VM creation process will take some time. Once the VM creation is completed, the user will be able to connect to it via SSH.