Skip to main content
All CollectionsRouter Setup GuidesPFSense
OpenVPN Setup Guide for pfSense (UDP)
OpenVPN Setup Guide for pfSense (UDP)
Richard avatar
Written by Richard
Updated over 2 years ago

Step 1

Go to System menu and then select Certificate Manager. Click on +Add.


Step 2

Enter the following settings:
Descriptive Name: PrivateVPN
Method: Import an existing Certificate Authority
Certificate Data:

-----BEGIN CERTIFICATE-----
MIIErTCCA5WgAwIBAgIJAPp3HmtYGCIOMA0GCSqGSIb3DQEBCwUAMIGVMQswCQYD
VQQGEwJTRTELMAkGA1UECBMCQ0ExEjAQBgNVBAcTCVN0b2NraG9sbTETMBEGA1UE
ChMKUHJpdmF0ZVZQTjEWMBQGA1UEAxMNUHJpdmF0ZVZQTiBDQTETMBEGA1UEKRMK
UHJpdmF0ZVZQTjEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBwcml2YXR2cG4uc2Uw
HhcNMTcwNTI0MjAxNTM3WhcNMjcwNTIyMjAxNTM3WjCBlTELMAkGA1UEBhMCU0Ux
CzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlTdG9ja2hvbG0xEzARBgNVBAoTClByaXZh
dGVWUE4xFjAUBgNVBAMTDVByaXZhdGVWUE4gQ0ExEzARBgNVBCkTClByaXZhdGVW
UE4xIzAhBgkqhkiG9w0BCQEWFHN1cHBvcnRAcHJpdmF0dnBuLnNlMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwjqTWbKk85WN8nd1TaBgBnBHceQWosp8
mMHr4xWMTLagWRcq2Modfy7RPnBo9kyn5j/ZZwL/21gLWJbxidurGyZZdEV9Wb5K
Ql3DUNxa19kwAbkkEchdES61e99MjmQlWq4vGPXAHjEuDxOZ906AXglCyAvQoXcY
W0mNm9yybWllVp1aBrCaZQrNYr7eoFvolqJXdQQ3FFsTBCYa5bHJcKQLBfsiqdJ/
BAxhNkQtcmWNSgLy16qoxQpCsxNCxAcYnasuL4rwOP+RazBkJTPXA/2neCJC5rt+
sXR9CSfiXdJGwMpYso5m31ZEd7JL2+is0FeAZ6ETrKMnEZMsTpTkdwIDAQABo4H9
MIH6MB0GA1UdDgQWBBRCkBlC94zCY6VNncMnK36JxT7bazCBygYDVR0jBIHCMIG/
gBRCkBlC94zCY6VNncMnK36JxT7ba6GBm6SBmDCBlTELMAkGA1UEBhMCU0UxCzAJ
BgNVBAgTAkNBMRIwEAYDVQQHEwlTdG9ja2hvbG0xEzARBgNVBAoTClByaXZhdGVW
UE4xFjAUBgNVBAMTDVByaXZhdGVWUE4gQ0ExEzARBgNVBCkTClByaXZhdGVWUE4x
IzAhBgkqhkiG9w0BCQEWFHN1cHBvcnRAcHJpdmF0dnBuLnNlggkA+ncea1gYIg4w
DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAayugvExKDHar7t1zyYn9
9Vt1NMf46J8x4Dt9TNjBml5mR9nKvWmreMUuuOhLaO8Da466KGdXeDFNLcBYZd/J
2iTawE6/3fmrML9H2sa+k/+E4uU5nQ84ZGOwCinCkMalVjM8EZ0/H2RZvLAVUnvP
uUz2JfJhmiRkbeE75fVuqpAm9qdE+/7lg3oICYzxa6BJPxT+Imdjy3Q/FWdsXqX6
aallhohPAZlMZgZL4eXECnV8rAfzyjOJggkMDZQt3Flc0Y4iDMfzrEhSOWMkNFBF
wjK0F/dnhsX+fPX6GGRpUZgZcCt/hWvypqc05/SnrdKM/vV/jV/yZe0NVzY7S8Ur
5g==
-----END CERTIFICATE-----

click Save.


Step 3

Click VPN at the top menu and then select OpenVPN.


Step 4

Choose on Clients tab and then click +Add.


Step 5

Enter the following settings:
Server mode: Peer to Peer (SSL/TLS)
Protocol: UDP on IPv4 only
Device mode: tun - Layer 3 Tunnel Mode
Interface: WAN
Server host or address: se-sto.pvdata.host
*you'll find the server list here.
Server Port: 1194


Description: PrivateVPN


Username: (your PrivateVPN registered email address)
Password: (your password)


Enable use a TLS key.
untick Automatic generate a TLS Key then enter enter this code:

-----BEGIN OpenVPN Static key V1-----
f035a3acaeffb5aedb5bc920bca26ca7
ac701da88249008e03563eba6af6d262
5ac8ba1e5e0921f76be004c24ae4fd43
e42caf0f84269ad44d8d4c14ba45b138
6f251c7330d8cc56afd16d5168356456
51ef7e87a723ac78ae0d49da5b2f2d78
ceafcff7a6367d0712628a6547e5fc8f
ef93c87f7bcd6107c7b1ae68396e944a
adae50111d01a5d0c67223d667bdbf1b
f434bdef03644ecc5386e102724eef38
72f66547eb66dc0fea8286069cb082a4
1c89083b28fe9f4cec25d48017f26c4f
d85b25ddf2ae5448dd2bccf3eef2aacf
42ef1e88c3248c689423d0b05a641e9e
79dd6b9b5c40f0cc21ffdc891b9eee95
1477b537261cb56a958a4f490d961ecb
-----END OpenVPN Static key V1-----


TLS Key Usage Mode: TLS Authentication
TLS keydir direction: Direction 1
Peer Certificate Authority: PrivateVPN
Client Certificate: None


Enable Data Encryption Negotiation.
Data Encryption Algorithms: AES-128-GCM, AES-128-CBC, AES-256-GCM
Fallback Data Encryption Algorithm: AES-256-CBC (256 bit key, 128 block)
Auth digest algorithm: SHA256 (256-bit)


Gateway creation: IPv4
*Leave the others on their default settings.
Click on the Save button below.


Step 6

Click Interfaces at the top menu then select Assignments.


Step 7

Enter the following settings:
WAN: (set your WAN Interface)
LAN: (set your LAN Interface)
Click +Add then set the Interface to PrivateVPN
Click on Save.


Step 8

Click Firewall at the top menu then choose NAT.


Step 9

Click on Outbound Tab.
Select Manual Outbound NAT rule generation (AON - Advanced Outbound NAT).
Click Save and then Apply Changes.


Step 10

Click Add new mapping to the top list button.


Step 11

Enter the following:
Interface: OpenVPN
Address Family: IPv4
Protocol: Any
Source: Any
Click Save and Apply Changes.


Step 12

Click Firewall at the top menu then choose Rules.


Step 13

Add a new Rule then enter the following:
Action: Pass
Interface: LAN
Family Address: IPv4
Protocol: Any
Source: LAN net
Leave the rest at defaults then click on Save.

Did this answer your question?