Arch Linux: netctl and vpnc (Cisco VPN)

16 Dec 2015 in TIL

This is an example of how to connect to a Cisco VPN using netctl on Arch Linux.

First, install vpnc from Pacman. You'll also need the netctl-vpc package from AUR (I use yaourt for this)

sudo pacman -S vpnc
yaourt -S netctl-vpnc

Next, create /etc/vpnc/vpn-<yourname>.conf with the following content:

Interface name tun<yourname>0
IPSec gateway <gateway>
IPSec ID <group name>
IPSec secret <group secret>
Xauth username <username>
Xauth password <password>
Pidfile /var/run/vpnc/vpn-<yourname>.pid

Create /etc/netctl/vpn-<yourname>.conf with the following content:

Description='Acme Corp VPN'

Then run it:

sudo netctl start vpn-<yourname>
ps aux | grep vpnc

To stop the VPN, run

sudo netctl stop vpn-<yourname>