Skip to main content

Cisco VPN connector

Project description

pyvpnc is a Python connector for vpnc, a Cisco VPN concentrator/router client. The vpnc daemon requires elevated permissions to run; you will be prompted for your admin/sudo password if needed.


First, install vpnc. On Debian/Ubuntu:

apt-get install vpnc


brew install vpnc

Then install pyvpnc using pip:

pip install vpnc


from vpnc import VPNC

vpn_client = VPNC(config={
    "IPSec_ID": "my IPSec ID",
    "IPSec_gateway": "",
    "IPSec_secret": "my IPSec secret",
    "Xauth_username": "my Xauth username",
    "Xauth_password": "my Xauth password",
    "IKE_Authmode": "psk"

with vpn_client.vpn():
    # do stuff on the VPN!


Unit tests are in the test/ directory.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for vpnc, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size vpnc-0.2.0-py2-none-any.whl (3.5 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size vpnc-0.2.0-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size vpnc-0.2.0.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page