After setting up your own VPN server, follow these steps to configure your devices. IPsec/XAuth (“Cisco IPsec”) is natively supported by Android, iOS and OS X. There is no additional software to install. Windows users can use the free Shrew Soft client. In case you are unable to connect, first check to make sure the VPN credentials were entered correctly.
IPsec/XAuth mode is also called “Cisco IPsec”. This mode is generally faster than IPsec/L2TP with less overhead.
You may also connect using IKEv2 (recommended) or IPsec/L2TP mode. No additional software is required.
Your VPN Server IP
in the Host Name or IP Address field.Your VPN IPsec PSK
in the Pre Shared Key field.Your VPN Username
in the Username field.Your VPN Password
in the Password field.Once connected, you will see tunnel enabled in the VPN Connect status window. Click the “Network” tab, and confirm that Established - 1 is displayed under “Security Associations”. You can verify that your traffic is being routed properly by looking up your IP address on Google. It should say “Your public IP address is Your VPN Server IP
”.
If you get an error when trying to connect, see Troubleshooting.
You may also connect using IKEv2 (recommended) or IPsec/L2TP mode.
Your VPN Server IP
for the Server address.Your VPN Username
for the Account name.Your VPN Password
for the Password.Your VPN IPsec PSK
for the Shared secret.Show in Menu Bar
from the VPN drop-down menu.To connect to the VPN: Use the menu bar icon, or go to the VPN section of System Settings and toggle the switch for your VPN configuration. You can verify that your traffic is being routed properly by looking up your IP address on Google. It should say “Your public IP address is Your VPN Server IP
”.
If you get an error when trying to connect, see Troubleshooting.
You may also connect using IKEv2 (recommended) or IPsec/L2TP mode.
Your VPN Server IP
for the Server Address.Your VPN Username
for the Account Name.Your VPN Password
for the Password.Your VPN IPsec PSK
.To connect to the VPN: Use the menu bar icon, or go to the Network section of System Preferences, select the VPN and choose Connect. You can verify that your traffic is being routed properly by looking up your IP address on Google. It should say “Your public IP address is Your VPN Server IP
”.
If you get an error when trying to connect, see Troubleshooting.
Important: Android users should instead connect using IKEv2 mode (recommended), which is more secure. Android 12+ only supports IKEv2 mode. The native VPN client in Android uses the less secure modp1024
(DH group 2) for the IPsec/L2TP and IPsec/XAuth (“Cisco IPsec”) modes.
If you still want to connect using IPsec/XAuth mode, you must first edit /etc/ipsec.conf
on the VPN server. Find the line ike=...
and append ,aes256-sha2;modp1024,aes128-sha1;modp1024
at the end. Save the file and run service ipsec restart
.
Docker users: Add VPN_ENABLE_MODP1024=yes
to your env file, then re-create the Docker container.
After that, follow the steps below on your Android device:
Your VPN Server IP
in the Server address field.Your VPN IPsec PSK
in the IPSec pre-shared key field.Your VPN Username
in the Username field.Your VPN Password
in the Password field.Once connected, you will see a VPN icon in the notification bar. You can verify that your traffic is being routed properly by looking up your IP address on Google. It should say “Your public IP address is Your VPN Server IP
”.
If you get an error when trying to connect, see Troubleshooting.
You may also connect using IKEv2 (recommended) or IPsec/L2TP mode.
Your VPN Server IP
.Your VPN Username
.Your VPN Password
.Your VPN IPsec PSK
.Once connected, you will see a VPN icon in the status bar. You can verify that your traffic is being routed properly by looking up your IP address on Google. It should say “Your public IP address is Your VPN Server IP
”.
If you get an error when trying to connect, see Troubleshooting.
You may also connect using IKEv2 mode (recommended).
Fedora 28 (and newer) and CentOS 8/7 users can install the NetworkManager-libreswan-gnome
package using yum
, then configure the IPsec/XAuth VPN client using the GUI.
Your VPN Server IP
for the Gateway.Your VPN Username
for the User name.Your VPN Password
for the User password.Your VPN IPsec PSK
for the Secret.Once connected, you can verify that your traffic is being routed properly by looking up your IP address on Google. It should say “Your public IP address is Your VPN Server IP
”.
Other Linux users can connect using IPsec/L2TP mode.
Note: This license applies to this document only.
Copyright (C) 2016-2025 Lin Song
Inspired by the work of Joshua Lund
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.