Now, we will go through details on how to setup VPN on pfsense.
Requirements : • 2 unit of Soekris or pc install with Pfsense
Network Diagram :
Network Setting On PfsensePfsense1 :
WAN IP : 10.10.100.222
LAN IP : 10.0.0.1
Gateway IP : 10.10.100.221
Pfsense2 :
WAN IP : 10.10.100.223
LAN IP : 10.20.20.1
Gateway IP : 10.10.100.221
Configuring the VPN Tunnel Between Pfsense (IPSec)Now we setup the VPN tunnel on each pfsense
1. Login to Pfsense
2. Go to VPN (IPsec)
3. Click On Tunnels Tab
4. Click the little + sign to create a new VPN tunnel
Now we have some setting like this :
Pfsense1Interface : WAN
Local Subnet : Type : LAN Subnet
Remote Subnet : 10.20.20.0/24
Remote Gateway : 10.10.100.223
Description : VPN FW 2
Phase1 proposal (Authentication)Negotiation mode : aggressive
My identifier : My IP address
Encryption algorithm :3DES
Hash algorithm : SHA1
DH key group : 2
Lifetime : 28800
Authentication method : Pre-shared key
Pre-Shared Key : try@try@1234@aslah
Phase 2 proposal (SA/Key Exchange)Protocol : ESP
Encryption algorithms : 3DES
Hash algorithms : SHA1
PFS key group : 2
Lifetime : 28800
Figure1 : Tunnels Configuration For Pfsense1Pfsense2Interface : WAN
Local Subnet : Type : LAN Subnet
Remote Subnet : 10.0.0.0/24
Remote Gateway : 10.10.100.222
Description : VPN FW 1
Phase1 proposal (Authentication)Negotiation mode : aggressive
My identifier : My IP address
Encryption algorithm :3DES
Hash algorithm : SHA1
DH key group : 2
Lifetime : 28800
Authentication method : Pre-shared keyPre-Shared Key : try@try@1234@aslah
Phase 2 proposal (SA/Key Exchange)
Protocol : ESP
Encryption algorithms : 3DES
Hash algorithms : SHA1
PFS key group : 2
Lifetime : 28800
Figure2 : Tunnels Configuration For Pfsense2Configuring Remote Access IPSec VPN (PPTP)Here we are using PPTP as a remote access VPN. The first thing we want to do is setup the PPTP server. To do this
1. Login to Pfsense
2. Go to VPN (PPTP)
3. Choose “Enable PPTP Server”
Now Pfsense have some setting like this :
Pfsense1Server address : 10.0.0.252
Remote address range : 10.0.0.192/28
Pfsense2Server address : 20.20.1.252
Remote address range : 20.20.1.192/28
Then we need to configure PPTP users. To do this
1. Go to VPN (PPTP)
2. Click On Users Tab
3. Click the little + sign to create a new PPTP user
Now Pfsense have some setting like this :
Username : testing
Password : test@test.com
test@test.com (confirmation)
Configure Rules For IPSec Tunnels and PPTP UsersIn this example, we allowed any traffic can get through IPSec Tunnels while PPTP users can access everything.
Figure3 : IPSec Rules For Pfsense1
Figure4 : IPSec Rules For Pfsense2
Figure5 : PPTP VPN Rules For Pfsense1
Figure6 : PPTP VPN Rules For Pfsense2Setting Up a PPTP Client on Windows XPHere is an example to create a PPTP client on Microsoft XP
1. Accessing the Network Control Panel
2. Click “Create New Connection” in the left hand column of the “Network Connections” window
3. You are now presented with a Wizard. Click Next to continue
4. Select “Connect to the Network at my Workplace” from the menu
5. Select Virtual Private Network connection from the next panel


6. Name the connection
7. Now enter the IP or FQDN of the PPTP Server. (This can be any of the configured interfaces.)


8. If you are the system admin you will be asked if you want this to be for your use only or for anyone’s use. I suggest you limit it to your use only unless you want the VPN network to be made available to all user accounts on the workstation
9. Next you can either just finish or add a shortcut to the desktop. You are nearly done!
10. When you launch the client for the first time (hopefully from the icon you asked it to create from the wizard, if not then you will need to access the “Network Connections” window again and double click your new connection.) you will be asked for a username and password. Click connect when you are done with this and if all goes well you will connect to the PPTP Server