vpnc
Quick Reference
Command Name:
vpnc
Category:
networking
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
Syntax
vpnc [options] [config file]
Options
Option | Description |
---|---|
--gateway host |
IP/name of your IPSec gateway |
--id name |
Your group name |
--username name |
Your username |
--domain domain |
Domain name for authentication |
--xauth-password pass |
Password for Xauth authentication (insecure, not recommended) |
--password pass |
Password for IPSec authentication (insecure, not recommended) |
--local-port port |
Local port to use (default: 500) |
--udp-port port |
Local UDP port number to use (default: 10000) |
--local-addr ip |
Local IP address to use |
--netmask mask |
Netmask for tunnel (default: 255.255.255.255) |
--version |
Display version information and exit |
--ifname name |
Interface name to use (default: tun0) |
--debug level |
Debug level (0-99, default: 0) |
--no-detach |
Don't detach from the console after login |
--pid-file file |
Store process ID in file |
--dpd-idle seconds |
Send DPD packet after inactivity (default: 300 seconds) |
--non-inter |
Don't ask for passwords interactively |
--vendor vendor |
Vendor of IPSec gateway (cisco/netscreen/fortigate) |
--natt-mode mode |
NAT-Traversal method (cisco-udp/natt/none/force-natt) |
--script script |
Run script to handle routing changes |
--dh dh-group |
Use DH group (dh1/dh2/dh5/dh14/dh15/dh16/dh17/dh18/dh19/dh20/dh21) |
--pfs pfs-group |
Use PFS group (nopfs/dh1/dh2/dh5/dh14/dh15/dh16/dh17/dh18/dh19/dh20/dh21) |
--enable-1des |
Enable single DES encryption (insecure) |
--disable-natt |
Disable NAT-T support |
--disable-dpd |
Disable DPD (Dead Peer Detection) |
Configuration File Format
vpnc can use a configuration file (default: /etc/vpnc/default.conf). The format is:
IPSec gateway vpn.example.com IPSec ID GroupName IPSec secret group_password Xauth username your_username Xauth password your_password
Additional configuration options:
Configuration Option | Description |
---|---|
Interface name |
Name of the tunnel interface (default: tun0) |
IKE Authmode |
Authentication mode (psk/cert/hybrid) |
Local Port |
Local IPSec port number to use |
DPD idle timeout |
Seconds for DPD idle timeout |
Vendor |
Vendor of IPSec gateway |
Examples
How to Use These Examples
The examples below show common ways to use the vpnc
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.