I've been trying to figure out a complete working solution for IPSec VPN implementation on FreeBSD but with no luck till now. pfSense seems did a fantastic job on supporting IPSec and even for mobile clients, so I downloaded and installed pfSense hoping to figure out how it works, or at least see some configuration examples, but I couldn't find anything interesting maybe because I'm not familiar with pfSense, so I'd like to ask for help.

  1. How pfSense implements IPSec, what tools are used?
  2. Where does pfSense store all its configuration files?

And since pfSense has its own kernel mods and acts as a different OS, there's no way for us to install it on top of an existing FreeBSD box, and plus that it is such a great project combining those fantastic features, so my question can kinda be extended as:

How do we learn from pfSense, and implement its features on top of a regular FreeBSD server?


Check the /var/etc/racoon.conf that's generated. There are also various SPD-related commands outside of that, you'll have to check the source in /etc/inc/vpn.inc and ipsec.inc. Or just read up on setkey.conf in FreeBSD.


When you will install PfSense for the first time, then you will forget to do ANYTHING manually or by going into conf files. As pretty much everything related to VPN settings can be done through its GUI and its the BEST VPN server i have ever seen (atleast for my requirement, of small to medium sized company, providing 255+ vpn connections and the most easiest configuration)


If you want to learn how to implement IPSEC VPNs on FreeBSD I suggest you peruse the FreeBSD Handbook, or hit Google and work your way through one of the many tutorials.

If you want to learn what pfSense is doing, configure the VPN using the pfSense GUI, then look at the resulting configuration files from the command line.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.