By default, the PFsense firewall does not allow external SSH connections to the WAN interface.
In our example we are going to create a firewall rule to allow the SSH communication.
Access the Pfsense Firewall menu and select the Rules option.
Click on the Add button to add a rule to the Top of the list.
On the Firewall rule creation screen, perform the following configuration:
• Action - Pass
• Interface - WAN
• Address family - IPV4
• Protocol - TCP
On the Source configuration screen, you need to define the IP address that should be allowed to perform SSH communication with the Pfsense firewall.
In our example, any computer is able to perform SSH communication with the firewall.
On the Firewall destination screen, perform the following configuration:
• Destination - Wan address
• Destination port range- From SSH (22) to SSH (22)
On the Firewall Extra options screen, you may enter a description to the firewall rule.
Click on the Save button, you will be sent back to the Firewall configuration screen.
Now, you need to reload the firewall rules to apply the SSH configuration.
Click on the Apply changes button to reload the firewall configuration.
You have finished the PFsense firewall configuration to allow SSH communication using the WAN interface.