vim /etc/openvpn/client.conf
client
dev tun
proto udp
remote vpn.domain.com 1994
resolv-retry infinite
nobind
persist-key
persist-tun
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
ca /etc/openvpn/client/something.crt
;cert client.crt
;key client.key
remote-cert-tls server
;tls-auth ta.key 1
cipher AES-256-CBC
comp-lzo
verb 3
;mute 20
auth SHA256
auth-user-pass /etc/openvpn/client/.vpnlogin.txt
1. Create a new certificate by selecting the ‘Add/Sign’ button on the ‘System / Certificate Manager / Certificates’ page.
2. Make sure the highlighted fields match OR are populated with the information that corresponds to you.
1. Create a new OpenVPN server by selecting the ‘Add’ button on the ‘VPN / OpenVPN / Servers’ page.
2. I will be using the following settings. Modify yours as necessary.
push "dhcp-option DOMAIN int.example.com";
push "route 10.0.0.0 255.255.0.0";
1. Create a new OpenVPN client by selecting the ‘Add’ button on the ‘VPN / OpenVPN / Clients’ page.
2. I will be using the following settings. Modify yours as necessary.
1. Download the Giganews Certificate Authority certificate to your local machine.
wget -O ca.vyprvpn.com.crt https://www.giganews.com/vyprvpn/ca.vyprvpn.com.crt
2. In pfSense, go to ‘System’ → ‘Cert. Manager’
3. Under ‘CAs', select ‘Add’
4. Give the new CA a descriptive name and set ‘Method’ to ‘Import an existing Certificate Authority’
5. Open the CA we download in Step 1 with a text editor, copy ALL of the contents of the file.
Meaning:
-----BEGIN CERTIFICATE-----
. . . . .
rZUsdGGfG+HSPsrqFFiLGe7Y4e2+a7vGdSY9qR9PAzyx0ijCCrYzZDIsb2dwjLct
Ux6a3LNV8cpfhKX+s6tfMldGufPI7byHT1Ybf0NtMS1d1RjD6IbqedXQdCKtaw68
kTX//wIDAQABo2MwYTAdBgNVHQ4EFgQU2EbQvBd1r/EADr2jCPMXsH7zEXEwHwYD
. . . . .
-----END CERTIFICATE-----
6. Paste the CA into the ‘Certificate data’ field. Click ‘Save’.
7. Navigate to OpenVPN → Clients
8. Click ‘Add’
9. Change the highlighted fields as indicated below. Populate fields such as ‘Server host or address’, ‘Server Port’ and ‘Description' with your own data accordingly.
This configuration is set to not pull routes from the VPN server. I will be using this VPN as an optional gateway and controlling what traverses it via pfSense firewall rules (tagging).
resolv-retry infinite
keepalive 10 60
persist-key
persist-tun
persist-remote-ip
verify-x509-name ca1.vpn.giganews.com name
verb 3
tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA
10. Save the configuration. The OpenVPN Client should start automatically. Using the ‘Services Status’ and ‘OpenVPN’ widgets on the home screen will give basic details about the client's status. If the client won't start, check the logs. It's usually pretty obvious about what the issue may be.