pfSense as NAT instance

After creating a virtual machine in Yandex Cloud, the user will be able to use SSH to connect and obtain a password to access the pfSense firewall web interface.

  1. To connect via ssh, the following command is required:
ssh freebsd@public_vm_public_ip

To access the console, press the number “8”. After that, the file with the created password will be available at the conf/root_password

With this password, you can log in to the web interface at https://public-ip-vm

  • Username: admin
  • Password: from file
  1. After successful authorization the user can proceed to basic configuration. To do this go to Interfaces –> Assignments and click “Add” (see Figure 1).

Figure 1. Adding the new Interface

AAfter adding the interface, the user needs to proceed to static IP address settings (see Figure 2).

Figure 2. Setting the Static IP Address

First, it is necessary to activate the network interface by checking the “Enable” option. The user should select “Static IPv4” in the “IPv4 Configuration Type” field.

Next, the user sets the IP address of their preference and selects a subnet mask (see Figure 3).

Figure 3. Setting the IP Address and Subnet Mask

After making the changes, the user should click “Save” and then “Apply changes”.

The next step is to configure static routing for virtual machines in the user’s private network. To do this, the user should click on the “Add a route” button. A window will appear and the user must specify the route parameters.

In our case, the private network is 10.128.0.0.0/24 and the pfSense LAN interface has the address of 10.128.0.11, then static routing looks like this (see Figure 4).

Figure 4. Adding the Static Route

To save the changes made, the user needs to click on the “Create a routing table” button (see Figure 5).

Figure 5. Saving the Added Route

Configuration complete.