VPNC(8)
β¨ NAME β¨
okay so this page is about the vpnc command β client for Cisco VPN3000 Concentrator, IOS and PIX β and it also covers its bestie vpnc-disconnect. π
β¨ SYNOPSIS β¨
vpnc [--version] [--print-config] [--help] [--long-help] [options]
[config files]
β¨ DESCRIPTION β¨
Real talk, this manual page is just a quick rundown of the vpnc and vpnc-disconnect commands. π
vpnc is a VPN client for the Cisco 3000 VPN Concentrator, and what it does is build an IPSec-like connection and hand it to your local system as a tunneling network device. It uses the TUN/TAP driver in Linux kernel 2.4 and above, and the device tun(4) on BSD. That connection it makes? It shows up on your local system as a tunneling network device. β¨
Obligatory warning, no cap: the most used configuration (XAUTH authentication with pre-shared keys and password authentication) is insecure by design. Be aware of this fact when you use vpnc to exchange sensitive data like passwords! π
The vpnc daemon by itself does not set any routes β it calls vpnc-script to do that job. vpnc-script displays a connect banner. If the concentrator supplies a network list for split-tunneling, these networks are added to the routing table. Otherwise the default-route will be modified to point to the tunnel. Further, a host route to the concentrator is added in the later case. And if the client host needs DHCP, care must be taken to add another host route to the DHCP-Server around the tunnel. π«Ά
The vpnc-disconnect command is the moment of truth β it terminates the connection that vpnc previously created and restores the previous routing configuration. bye bestie π
πΈ CONFIGURATION πΈ
The daemon reads its configuration data from these places, in this order:
- command line options
- config file(s) specified on the command line
/etc/vpnc/default.conf/etc/vpnc.conf- prompting the user if not found above
vpnc can parse options and configuration files in any order. But here's the tea: the first place to set an option wins. β¨
Also, configuration filenames that do not contain a / will be searched at /etc/vpnc/<filename> and /etc/vpnc/<filename>.conf. Otherwise <filename> and <filename>.conf will be used. If no configuration file is specified on the command-line at all, both /etc/vpnc/default.conf and /etc/vpnc.conf will be loaded.
Additionally, if the configuration file - is specified on the command-line, vpnc will read configuration from stdin. The configuration is parsed and the connection proceeds when stdin is closed or the special character CEOT (Ctrl+D) is read. π
π OPTIONS π
So the program options can either be given as arguments (but not all of them, for security reasons, obviously π) or be stored in a configuration file.
--gateway <ip/hostname>β IP/name of your IPSec gateway conf-variable:IPSec gateway <ip/hostname>--id <ASCII string>β your group name conf-variable:IPSec ID <ASCII string>- (configfile only option) β your group password (cleartext) conf-variable:
IPSec secret <ASCII string> - (configfile only option) β your group password (obfuscated) conf-variable:
IPSec obfuscated secret <hex string> --username <ASCII string>β your username conf-variable:Xauth username <ASCII string>- (configfile only option) β PIN for Nortel Two-Factor Authentication conf-variable:
Xauth PIN <ASCII string> - (configfile only option) β your password (cleartext) conf-variable:
Xauth password <ASCII string> - (configfile only option) β your password (obfuscated) conf-variable:
Xauth obfuscated password <hex string> --domain <ASCII string>β (NT-) Domain name for authentication conf-variable:Domain <ASCII string>--xauth-interβ enable interactive extended authentication (for challenge response auth) conf-variable:Xauth interactive--vendor <cisco/netscreen/nortel>β vendor of your IPSec gateway Default:ciscoconf-variable:Vendor <cisco/netscreen/nortel>--natt-mode <natt/none/force-natt/cisco-udp/nortel-udp>β Which NAT-Traversal Method to use:nattβ NAT-T as defined in RFC3947noneβ disable use of any NAT-T methodforce-nattβ always use NAT-T encapsulation even without presence of a NAT device (useful if the OS captures all ESP traffic)cisco-udpβ Cisco proprietary UDP encapsulation, commonly over Port 10000nortel-udpβ Nortel proprietary UDP encapsulation
Note: cisco-tcp encapsulation is not yet supported Default: natt conf-variable: NAT Traversal Mode <natt/none/force-natt/cisco-udp/nortel-udp>
--script <command>βcommandis executed usingsystem()to configure the interface, routing and so on. Device name, IP, etc. are passed using environment variables, see README. This script is executed right after ISAKMP is done, but before tunneling is enabled. It is called whenvpncterminates, too Default:/etc/vpnc/vpnc-scriptconf-variable:Script <command>--dh <dh1/dh2/dh5>β name of the IKE DH Group Default:dh2conf-variable:IKE DH Group <dh1/dh2/dh5>--pfs <nopfs/dh1/dh2/dh5/server>β Diffie-Hellman group to use for PFS Default:serverconf-variable:Perfect Forward Secrecy <nopfs/dh1/dh2/dh5/server>--enable-1desβ enables weak single DES encryption conf-variable:Enable Single DES--enable-no-encryptionβ enables using no encryption for data traffic (key exchanged must be encrypted) conf-variable:Enable no encryption--nortel-client-id <list/0-65535/ASCII string>β Nortel Client version ID sent during connection. Use"list"to print allowed values. Default:V04_15conf-variable:Nortel Client ID <list/0-65535/ASCII string>--application-version <ASCII string>β Application Version to report. Note: Default string is generated at runtime. Default:Cisco Systems VPN Client 0.5.3:Linuxconf-variable:Application version <ASCII string>--ifname <ASCII string>β visible name of the TUN/TAP interface conf-variable:Interface name <ASCII string>--ifmode <tun/tap>β mode of TUN/TAP interface:tun: virtual point to point interface (default)tap: virtual ethernet interface
Default: tun conf-variable: Interface mode <tun/tap>
--ifmtu <0-65535>β Set MTU for TUN/TAP interface (default0== automatic detect) conf-variable:Interface MTU <0-65535>--debug <0/1/2/3/99>β Show verbose debug messages0: Do not print debug information.1: Print minimal debug information.2: Show statemachine and packet/payload type information.3: Dump everything exluding authentication data.99: Dump everything INCLUDING AUTHENTICATION data (e.g. PASSWORDS).
conf-variable: Debug <0/1/2/3/99>
bestie, seriously, 99 dumps everything INCLUDING AUTHENTICATION data like PASSWORDS. know what you're doing before you go there π
--no-detachβ Don't detach from the console after login conf-variable:No Detach--pid-file <filename>β store the pid of background process in<filename>Default:/var/run/vpnc.pidconf-variable:Pidfile <filename>--local-addr <ip/hostname>β local IP to use for ISAKMP / ESP / ... (0.0.0.0== automatically assign) Default:0.0.0.0conf-variable:Local Addr <ip/hostname>--local-port <0-65535>β local ISAKMP port number to use (0== use random port) Default:500conf-variable:Local Port <0-65535>--udp-port <0-65535>β Local UDP port number to use (0== use random port). This is only relevant ifcisco-udpnat-traversal is used. This is the _local_ port, the remote udp port is discovered automatically. It is especially not thecisco-tcpport. Default:10000conf-variable:Cisco UDP Encapsulation Port <0-65535>--dpd-idle <0,10-86400>β Send DPD packet after not receiving anything for<idle>seconds. Use0to disable DPD completely (both ways). Default:300conf-variable:DPD idle timeout (our side) <0,10-86400>--non-interβ Don't ask anything, exit on missing options conf-variable:Noninteractive--auth-mode <default/cert/psk/hybrid/username/token/PIN-token/token-SW/gpassword>β Authentication mode:default: maps to vendor specific default modecert: server + client certificate (not implemented yet)psk: Cisco pre-shared key (default for Cisco)hybrid: Cisco server certificate + xauth (if built with openssl support)username: Nortel User Name and Password Authenticationtoken: Nortel Group Security - Response Only Token - Use Passcode (default for Nortel)PIN-token: Nortel Group Security - Response Only Token - Use Two-Factor Cardtoken-SW: Nortel Group Security - Response Only Token - Use SoftID Software (not implemented yet)gpassword: Nortel Group Security - Group Password Authentication
Default: default conf-variable: IKE Authmode <default/cert/psk/hybrid/username/token/PIN-token/token-SW/gpassword>
--ca-file <filename>β filename and path to the CA-PEM-File conf-variable:CA-File <filename>--ca-dir <directory>β path of the trusted CA-Directory Default:/etc/ssl/certsconf-variable:CA-Dir <directory>--target-network <target network/netmask>β Target network in dotted decimal or CIDR notation Default:0.0.0.0/0.0.0.0conf-variable:IPSEC target network <target network/netmask>--password-helper <executable>β path to password program or helper name conf-variable:Password helper <executable>--print-configβ Prints your configuration; output can be used asvpnc.conf
π FILES π
/etc/vpnc.conf/etc/vpnc/default.confβ The default configuration file. You can specify the same config directives as with command line options, and additionallyIPSec secretandXauth password, both supplying a cleartext password. Scrambled passwords from the Cisco configuration profiles can be used withIPSec obfuscated secretandXauth obfuscated password.
See EXAMPLES for further details. β¨
/etc/vpnc/*.confβvpncwill read configuration files in this directory when the config filename (with or without.conf) is specified on the command line. π¦
β¨ EXAMPLES β¨
okay so first up, hereβs an example vpnc.conf with pre-shared keys β itβs giving classic, reliable, no-drama VPN energy π
IPSec gateway vpn.example.com
IPSec ID ExampleVpnPSK
IKE Authmode psk
IPSec secret PskS3cret!
Xauth username user@example.com
Xauth password USecr3t
and hereβs another one with hybrid authentication β this one only works if vpnc was built with openssl support, bestie, so check that first π«Ά
IPSec gateway vpn.example.com
IPSec ID ExampleVpnHybrid
IKE Authmode hybrid
CA-Dir /etc/vpnc
or
CA-File /etc/vpnc/vpn-example-com.pem
IPSec secret HybS3cret?
Xauth username user@example.com
Xauth password 123456
the lines begin with a keyword β no leading spaces! β and the values start exactly one space after the keywords, then run to the end of the line. this lets you put any kind of weird character (except CR, LF and NUL) in your strings, but it does mean you canβt add comments after a string, or spaces before them. iykyk π
in case the CA-Dir option is used, your certificate needs to be named something like 722d15bd.X, where X is a manually assigned number to make sure that files with colliding hashes have different names. the number can be derived from the certificate file itself:
openssl x509 -subject_hash -noout -in /etc/vpnc/vpn-example-com.pem
see also the --print-config option to generate a config file, and the example file in the package documentation directory where more advanced usage is demonstrated. obsessed with options that do the work for you π
advanced features like manual setting of multiple target routes and disabling /etc/resolv.conf rewriting is documented in the README of the vpnc package. lowkey important, so donβt skip it β¨
π AUTHOR π
this man-page has been written by Eduard Bloch <blade(at)debian.org> and Christian Lackas <delta(at)lackas.net>, based on the vpnc README by Maurice Massar <vpnc(at)unix-ag.uni-kl.de>. permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. slay, licensing handled π
on Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. noted, fr fr πΈ
π SEE ALSO π
go check out pcf2vpnc(1), cisco-decrypt(1), ip(8), ifconfig(8), route(1), and http://www.unix-ag.uni-kl.de/~massar/vpnc/ β the whole little friend group of useful references π¦
π
and thatβs the page, bestie β source/version is vpnc version 0.5.3, dated February 2014, and itβs VPNC(8). mwah π
π¦ where this page comes from
- opensuse-leap 16.0: vpnc 0.5.3r550-bp160.1.15 Β· GPL-2.0-or-later
- opensuse-leap 16.0: vpnc 0.5.3r550-bp160.1.15 Β· GPL-2.0-or-later
- opensuse-leap 16.0: vpnc 0.5.3r550-bp160.1.15 Β· GPL-2.0-or-later
- opensuse-leap 16.0: vpnc 0.5.3r550-bp160.1.15 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms