Thank you for this guide; with your help I got things working on pfSense 2.0.1 with a few minor alterations, some of which are cryptodev/security/regulatory requirements based, some of which are specifically to require all OPT1 (wifi) traffic to flow over AES/SHA256 VPN (no exceptions), DNS included, and I deliberate use a ta_auth.key to increase security.
Setting up your pfSense firewall - match the parms in the config files (*.ovpn)
*** DO ENTER the interface for OpenVPN to LISTEN on
*** DO NOT UNCHECK "Enable authentication of TLS packets.
*** DO UNCHECK "Automatically generate a shared TLS authentication key" and instead paste in the contents of
the file that build-ta.bat created
*** DO CHECK "Redirect Gateway"
*** DO LEAVE "Remote Network" blank - we're not doing a site-to-site VPN
*** DO ENTER the maximum number of Concurrent Connections, if known
*** DO NOT CHECK "Compression" unless you know you're going to be sending compressible data
Note that remote desktop use is typically encrypted in and of itself, and is thus not compressible.
*** ADD 'auth SHA256;push "redirect-gateway def1";push "dhcp-option DNS <openvpn listening="" ip="" addr="">"' without the outer single quotes to the Advanced configuration, Advanced section at the bottom.
??? the redirect gateway may not be required if the checkbox is checked.
Sample initial client1.ovpn (I'm still working on this - in particular, I'd like to get away from DHE entirely):
client dev tun proto udp remote YourListeningInterfaceIPAddr 1194 #ns-cert-type is a pre-2.0 way of making sure we're not being spoofed by a client acting as a server keepalive 5 60 resolv-retry infinite nobind persist-key persist-tun # Wireless networks often produce a lot # of duplicate packets. Set this flag # to silence duplicate packet warnings. ;mute-replay-warnings # Verify server certificate by checking # that the certicate has the nsCertType # field set to "server". This is an # important precaution to protect against # a potential attack discussed here: # http://openvpn.net/howto.html#mitm # # To use this feature, you will need to generate # your server certificates with the nsCertType # field set to "server". The build-key-server # script in the easy-rsa folder will do this. ns-cert-type server ca ca.crt cert client1.crt key client1.key cipher AES-128-CBC auth SHA256 tls-cipher DHE-RSA-AES128-SHA tls-auth ta_auth.key 1 pull verb 3 # run "client.up" to add necessary # DNS entries to resolv.conf #;up /home/user/openvpnclient/sample-config-files/client.up # run "client.down" to remove # resolv.conf entries when VPN # is disconnected #;plugin "/usr/lib/openvpn/openvpn-down-root.so" "/home/user/openvpnclient/sample-config-files/client.down"CopyClientConfigs.bat (select the files each client needs):
md keys\client1 del /q keys\client1\* copy keys\ca.crt keys\client1 copy keys\EyeWearHausta.key keys\client1 copy keys\client1.crt keys\client1 copy keys\client1.key keys\client1 copy OpenVPNConfigFiles\client1.ovpn keys\client1build-ta.bat
openvpn --genkey --secret keys\ta_auth.keybuild-key-pass.bat
@echo off cd %HOME% rem build a request for a cert that will be valid for ten years openssl req -days 9000 -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% rem sign the cert request with our ca, creating a cert/key pair openssl ca -days 9000 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG% rem delete any .old files created in this process, to avoid future file creation errors del /q %KEY_DIR%\*.oldAnd the simple RunAll.bat
call vars.bat call build-ca.bat call build-key-server.bat server call build-key-pass.bat client1 call build-ta.bat call CopyClientConfigs.bat ```</openvpn>