How to get IPSec Working Between Watchguard and ClearOS

Let me start off that ClearOS is really fuzzy when it comes to IPSec VPN tunnels.  They don’t really support it, although everyone else does.  The web interface for ClearOS flat out doesn’t work for IPSec, and will break any working configs, so do yourself a favor and remove the ClearOS IPSec plugin (via ssh it’s “rpm -e app-ipsec”)

SSH into your ClearOS machine, and type in:

cd /etc/
mv ipsec.conf ipsec.conf.orig
touch ipsec.conf
nano ipsec.conf

And then insert the following config. Adjust it as needed:

version 2.0
#ClearOS LAN =
#ClearOS WAN IP =
#Watchguard LAN =
#Watchguard WAN IP =
config setup
conn Corporate #modify this to your tunnel name
        left= # adjust to your ClearOS WAN IP
        leftsourceip= #adjust to your ClearOS LAN IP
        leftnexthop= # adjust to your ClearOS WAN IP Gateway
        leftsubnet= #adjust to your ClearOS LAN Subnet
        right= # adjust to your Watchguard WAN IP
        rightsourceip= #adjust to your Watchguard LAN IP
        rightnexthop= #adjust to your Watchguard WAN IP Gateway
        rightsubnet= #adjust to your Watchguard LAN Subnet
        rightid= # adjust to your Watchguard WAN IP
# Disable OE
conn block
conn private
conn private-or-clear
conn clear-or-private
conn clear
conn packetdefault
# Tunnels defined in separate files
#include /etc/ipsec.d/*.conf

Then you’ll need to edit the password for the tunnel. You’ll need to name it the same as your tunnel name. I’m going to assume that the tunnel name is “Corporate”. Edit /etc/ipsec.d/ipsec.Corporate.secrets : PSK "TheTunnelPassword" # Far WAN IP, Near LAN IP

You’ll want to restart the ipsec service by issuing “service ipsec restart”

Now we’ll switch over to the Watchguard. I’m going to assume you already know how to setup an IPSec VPN tunnel (Watchguard calls it BOVPN). You’ll need to set your phase 1 and 2 PFS DH group to 5, use ESP phase1 with md5 and 3des. phase2 needs md5 and 3des. Make sure that the password matches. The tunnel should start. For troubleshooting if it doesn’t work is to either watch the logs in the Watchguard (which is a pain if you ask me), and/or you can watch the logs in the ClearOS box by running “tail -f /var/logs/secure” (watch for the “pluto” labeled logs).

This entry was posted in Networking and tagged , , , , , , , . Bookmark the permalink.

Comments are closed.