VPNC(8) | System Administration Utilities | VPNC(8) |
vpnc - client for Cisco VPN3000 Concentrator, IOS and PIX
vpnc [--version] [--print-config] [--help] [--long-help] [options] [config files]
This manual page documents briefly the vpnc and vpnc-disconnect commands.
vpnc is a VPN client for the Cisco 3000 VPN Concentrator, creating a IPSec-like connection as a tunneling network device for the local system. It uses the TUN/TAP driver in Linux kernel 2.4 and above and device tun(4) on BSD. The created connection is presented as a tunneling network device to the local system.
OBLIGATORY WARNING: 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, but it calls vpnc-script to do this 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. 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 used to terminate the connection previously created by vpnc and restore the previous routing configuration.
The daemon reads configuration data from the following places:
vpnc can parse options and configuration files in any order. However the first place to set an option wins. configuration filenames which 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.
The program options can be either given as arguments (but not all of them for security reasons) or be stored in a configuration file.
conf-variable: IPSec gateway <ip/hostname>
conf-variable: IPSec ID <ASCII string>
conf-variable: IPSec secret <ASCII string>
conf-variable: IPSec obfuscated secret <hex string>
conf-variable: Xauth username <ASCII string>
conf-variable: Xauth password <ASCII string>
conf-variable: Xauth obfuscated password <hex string>
conf-variable: Domain <ASCII string>
conf-variable: Xauth interactive
conf-variable: Vendor <cisco/netscreen/fortigate>
conf-variable: NAT Traversal Mode <natt/none/force-natt/cisco-udp>
conf-variable: Script <command>
conf-variable: IKE DH Group <dh1/dh2/dh5/dh14/dh15/dh16/dh17/dh18>
conf-variable: Perfect Forward Secrecy <nopfs/dh1/dh2/dh5/dh14/dh15/dh16/dh17/dh18/server>
conf-variable: Enable Single DES
conf-variable: Enable weak encryption
conf-variable: Enable no encryption
conf-variable: Enable weak authentication
conf-variable: Application version <ASCII string>
conf-variable: Interface name <ASCII string>
conf-variable: Interface mode <tun/tap>
conf-variable: Interface MTU <0-65535>
conf-variable: Debug <0/1/2/3/99>
conf-variable: No Detach
conf-variable: Pidfile <filename>
conf-variable: Local Addr <ip/hostname>
conf-variable: Local Port <0-65535>
conf-variable: Cisco UDP Encapsulation Port <0-65535>
conf-variable: DPD idle timeout (our side) <0,10-86400>
conf-variable: Noninteractive
conf-variable: IKE Authmode <psk/cert/hybrid>
conf-variable: CA-File <filename>
conf-variable: CA-Dir <directory>
conf-variable: IPSEC target network <target network/netmask>
conf-variable: Password helper <executable>
--print-config
/etc/vpnc.conf /etc/vpnc/default.conf
See EXAMPLES for further details.
/etc/vpnc/*.conf
This is an example vpnc.conf with pre-shared keys:
IPSec ID ExampleVpnPSK
IKE Authmode psk
IPSec secret PskS3cret!
Xauth username user@example.com
Xauth password USecr3t
And another one with hybrid authentication (requires that vpnc was built with openssl support):
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!). The values start exactly one space after the keywords, and run to the end of 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.
In case the 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.
Advanced features like manual setting of multiple target routes and disabling /etc/resolv.conf rewriting is documented in the README of the vpnc package.
This man-page has been written by Eduard Bloch <blade(at)debian.org> and Christian Lackas <delta(at)lackas.net>, based on 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.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
pcf2vpnc(1), cisco-decrypt(1), ip(8), ifconfig(8), route(1), http://www.unix-ag.uni-kl.de/~massar/vpnc/
November 2024 | vpnc version 0.5.3+git20241126-1 |