If you want to access the Internet without VPN as well you should configure public name servers, for instance those from Google or any from the OpenNIC-Project. If the VPN is connected, DNS requests will be sent anonymously over the VPN tunnel.
Go to the menu System > General Settings and enter at least two DNS servers of your choice. In this example we are using the Google name servers 22.214.171.124 and 126.96.36.199. Deactivate the option DNS Server Override. Leave the other settings as they are.
Configure the OpenVPN client as follows (we are using the Amsterdam server in this documentation):
Deactivate the option Automatically generate a TLS Key and copy the text between the <tls-auth></tls-auth> tags from the *.conf file into the field TLS Key.
Tip: Depending on the CPU performance on your router you may want to use the weaker encryption AES-128-CBC to get better speed and bandwidth. In this case choose AES-128-CBC for Encryption Algorithm.
Copy the following text block into the field Custom options:
tun-mtu 1500 fragment 1300 mssfix #float hand-window 120 inactive 604800 mute-replay-warnings ns-cert-type server persist-remote-ip redirect-gateway def1 reneg-sec 3600 resolv-retry 60 tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA tls-timeout 5 key-direction 1
Now click on Save.
Navigate to the menu Firewall > Rules > LAN and disable or remove the rule for the IPv6 protocol, then click on Save.
Now open the IPv4 rule with a click on the pen symbol (edit). Activate Advanced Options and choose VPN_PP_AMSTERDAM_VPN4 as the Gateway.
After saving the configuration should look like in the lower picture on the left.
Open the menu Services > DNS Resolver and choose the VPN Interface (VPN_PP_AMSTERDAM) in Outgoing Network Interfaces.
Note: With the default settings the DNS requests will be sent directly to your ISP which is why it is important to choose a VPN interface for outgoing DNS requests to prevent DNS leaks.
CAUTION: This step will activate the firewall protection (leak protection or „kill switch“).
If you proceed with these steps, the Internet connection will only work when a VPN tunnel has been established.
Go to the menu Firewall > NAT > Outbound and select the option Manual Outbound NAT rule generation and click on Save.
Now edit the WAN rules as shown in the picture on the left. Remove the Rule with the description Auto created rule for ISAKMP – LAN to WAN.
Edit the WAN rule with the description Auto created rule – LAN to WAN by clicking on the pen icon.
You can verify that the VPN connection is working properly by visiting our Check IP website on any device connected to the Internet via the pfSense router.
Optional: If you want to deactivate VPN again or temporarily want to use the Internet without VPN, follow these steps:Go to Firewall > NAT > Outbound and select the mode Automatic outbound NAT rule generation and click on Save.
Now switch back to Manual Outbound NAT rule generation and save again – this will restore the original WAN rules. With the rules shown in the upper picture on the left you will will be able to access the Internet without VPN.
Now go to Firewall > Rules > LAN and open the IPv6 rule. Activate Advanced Options and select Default as gateway.
If your ISP supports IPv6 then repeat the last step for the IPv6 rule. With the NAT rules being like shown in the left picture you will be able to access the Internet with and without VPN.