Before configuring an IPsec VPN Tunnel between a Barracuda NG Firewall and a pfSense Firewall, make sure that the VPN and Firewall services have been created on the Barracuda NG Firewall. For more information, see How to Configure Services.
The following article provides information and steps for configuring the IPsec VPN tunnel. It also provides an overview of the settings for creating the tunnel on the Barracuda NG Firewall.
In this article:
Configuration Overview and Recommendations
When creating IPsec tunnels between Barracuda NG Firewall and third party gateways, consider the following recommendations:
- Do not use "Supernetting." It is not supported.
- Configure lifetimes (i.e. tunnel rekeying times) as time (seconds only) and not as KB-values. The Phase 1 and Phase 2 lifetime should never have the same value.
- Tunnel partners must be active at one end and passive at the other end.
- Encryption and DH-Group settings must be identical on both tunnel ends. Thereby, the Perfect Forward Security (PFS) configuration matches the DH-Group / Phase 2 configuration on Barracuda NG Firewall systems.
- Lifetimes in Phase 1 must be greater than lifetimes in Phase 2.
- The local and remote network must not contain single IP addresses; they must be at least a network with mask /30.
- Do not use IPsec-SA bundling.
- The Barracuda NG Firewall ISAKMPD supports Dead Peer Detection (DPD). If the remote IPsec gateway does not support DPD, you must disable it in the advanced VPN server settings by entering 0 in the Dead Peer Detection Interval (s) field.
- Do not set the Tunnel Check Interval (s) to 0 seconds. The default value is 5 seconds. Specifying an interval that is less than 5 seconds will generate too much traffic.
- The Barracuda NG Firewall ISAKMPD implementation uses the IPv4_net and not IPv4_address as ID-Type.
- Only net announcements from the IPv4_net type is supported. Other announcement methods may generate "Supernetting" errors.
- Do not use identical or overlapping remote networks in different configured IPSec tunnels, the remote network is used for authentication.
For successful negotiations, the settings for Phase 1 and Phase 2 must meet the requirements of the remote peer. The IPsec specification allows two possible values for the local and remote network settings if the local or the remote network consists of only a single IP address.
Most of the IPsec implementations represent a single IP address as a network address in combination with a subnet mask (255.255.255.255). The IKE protocol is difficult to debug. Therefore, Barracuda NG Admin displays a warning message if IPsec networks contain single IP addresses. It may happen that an IPsec connection cannot be established and the following error is displayed: no compatible proposals chosen.
In this case, you should first verify whether both IPsec peers are using the same IPsec settings (e.g. encryption, hash method, etc.). If all settings are identical but the tunnel still fails to be established, you may try to use network addresses (using netmask 255.255.255.252) for the local and remote network settings.
If the tunnel can then properly be established, it means that the IPsec implementation is not compatible with the use of single IP addresses. In this case, a whole network range for the IPsec tunnel must be reserved.
Create the IPsec VPN Tunnel on the Barracuda NG Firewall
- Go to CONFIGURATION > Configuration Tree > Box > Virtual Servers > your virtual server > Assigned Services > VPN-Service > Site to Site.
- Click the IPSEC Tunnels tab.
- Click Lock.
- Right-click the table and select New IPSec tunnel. The IPsec Tunnel window opens.
- In the Name field, enter your tunnel name. For example, HQ2PFSense.
- Configure the local network settings. Click the Local Networks tab and specify the following settings:
- Local IKE Gateway – The external IP address of the Barracuda NG Firewall.
- Network Address – The external network IP address. Enter the address and then click Add. For example, 192.168.9.0/24.
- Configure the remote network settings. Click the Remote Networks tab and specify the following settings:
- Remote IKE Gateway – The external IP address of the pfSense unit.
- Network Address – The external network IP address of the pfSense unit. Enter the address and then click Add. For example, 10.10.110.0/24.
- Specify the shared passphrase. Click the Peer Identification tab and then enter the shared passphrase in the Passphrase field. For example, secret.
Configure the encryption settings. Click the Basics tab and then select the following Phase 1 and Phase 2 settings:
Phase 1 Setting Value Encryption 3DES Hash. Meth. MD5 DH-Group Group2 Lifetime [sec] 28800 Min. Lifetime [sec] 25200 Max. Lifetime [sec] 32400 Phase 2 Setting Value Encryption 3DES Hash. Meth. MD5 DH-Group Group1 Lifetime [sec] 3600 Min. Lifetime [sec] 1200 Max. Lifetime [sec] 4800 - Click the Advanced tab. In the DPD interval (s) field, enter
0
. - Click OK.
Click Send Changes and Activate.
For more information on the settings in the IPSec Tunnel configuration window, see the following IPSec Tunnel Settings section in this article.
Create the IPsec VPN Tunnel on the pfSense Firewall
- On the pfSense unit, select the VPN menu and choose IPSEC.
- Select the Enable IPsec check box.
- Click the + icon to add a tunnel.
- Configure the network settings. Specify the following settings:
- remote subnet – The remote subnet address. For example,
192.168.9.0/24
- Remote Gateway – The external IP address of the pfSense unit. For example,
192.168.100.1
- remote subnet – The remote subnet address. For example,
- Configure the settings in the Phase 1 proposal (Authentication) section.
Select the following settings:
Setting Value Encryption algorithm 3DES Hash algorithm MD5 DH key group 2 Lifetime 28800 Authentication method Pre-shared key - In the Pre-Shared Key field, enter the key. For example,
secret
.
Configure the settings in the Phase 2 proposal (SA/Key Exchange) section. Select the following settings:
Setting Value Hash algorithms MD5 PFS key group 1 Lifetime 3600 - Click Save.
Click Apply changes. You should now see the tunnel entry.
Create Firewall Rules for VPN Access
You must create firewall rules on the Barracuda NG Firewall and the pfSense Firewall to allow VPN traffic between them. On the Barracuda NG Firewall, the connection for the VPN rules must be set as Client\Std Client (same port). For more information on creating firewall rules, see Firewall Access Rules.
IPSec Tunnel Settings
For more information on the settings in the IPSec Tunnel configuration window, expand the following section:
Additional Information
- For general information about IPsec, see www.netbsd.org/Documentation/network/ipsec/.