{"id":4550,"date":"2019-11-05T21:20:27","date_gmt":"2019-11-05T18:20:27","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4550"},"modified":"2024-03-12T23:22:07","modified_gmt":"2024-03-12T20:22:07","slug":"connect-to-cisco-vpn-using-pcf-file-on-ubuntu","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/connect-to-cisco-vpn-using-pcf-file-on-ubuntu\/","title":{"rendered":"Connect to Cisco VPN Using PCF file on Ubuntu"},"content":{"rendered":"\n<p>You want to connect to Cisco VPN using <strong>Cisco<\/strong>&nbsp;Systems&nbsp;<strong>VPN<\/strong>&nbsp;Client and you have been provided with a profile configuration&nbsp;<strong>file<\/strong> (PCF) file. How do you connect to the VPN using the PCF file on Ubuntu\/Linux? In this guide, you will learn how to Connect to Cisco VPN Using PCF file on Ubuntu or other Debian based Linux systems.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Connecting to Cisco VPN Using PCF file on Ubuntu<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Install Cisco-compatible VPN client<\/h3>\n\n\n\n<p>To use PCF file while connecting to Cisco VPN Ubuntu and other Debian derivatives, you need to install Cisco-compatible VPN client (vpnc) and GNOME GUI plugin for VPNC. This can be done by simply executing the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install vpnc network-manager-vpnc-gnome<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Connecting to Cisco VPN using PCF File<\/h3>\n\n\n\n<p>Well, we have installed two Cisco-compatible VPN clients above. <code><strong>vpnc<\/strong><\/code>, can be used to connect to the Cisco VPN from command line? How is this possible?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Convert .PCF file to .CONF file<\/h3>\n\n\n\n<p>If you have a preconfigure Cisco VPN profile configuration file (PCF), you just need to convert it to <strong>.conf<\/strong> file by using the <code><strong>pcf2vpnc<\/strong><\/code> command. (<strong>Replace the names of the configuration files accordingly)<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><strong>pcf2vpnc<\/strong> kifarunix-demo.pcf kifarunix-demo.conf<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Connect to Cisco VPN from Command Line<\/h3>\n\n\n\n<p>Once you have the profile configuration file in .conf format, you can simply initiate the connect to the VPN by executing the command below if you are in the directory where the configuration file is located;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo vpnc .\/kifarunix-demo.conf<\/code><\/pre>\n\n\n\n<p>Otherwise, you can specify a path to the configuration file;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo vpnc \/path\/to\/kifarunix-demo.conf<\/code><\/pre>\n\n\n\n<p>When run, you will be prompted to enter the password for the connection username.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Enter password for kifarunix@vpn.kifarunix-demo.com: <strong>ENTER PASSWORD<\/strong>\nVPNC started in background (pid: 25502)...<\/code><\/pre>\n\n\n\n<p>You can verify that you have the VPN IP address assigned.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ip add show dev tun0<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>8: tun0: &lt;POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP&gt; mtu 1412 qdisc pfifo_fast state UNKNOWN group default qlen 500\n    link\/none \n    inet 192.168.30.139\/32 scope global tun0\n       valid_lft forever preferred_lft forever\n    inet6 fe80::2a8b:fd6e:c8da:cb45\/64 scope link flags 800 \n       valid_lft forever preferred_lft forever<\/code><\/pre>\n\n\n\n<p>You can as well run the command interactively;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo vpnc<\/code><\/pre>\n\n\n\n<p>To disconnect the VPN connection, simply run;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo vpnc-disconnect<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Connect to Cisco VPN using PCF File from GUI<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Create Cisco VPN Connection Profile<\/h3>\n\n\n\n<p>Create the Cisco VPN connection profile by clicking the Network connection icon and <strong>Edit the Connections<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/connections.png\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"412\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/connections.png\" alt=\"Connect to Cisco VPN Using PCF file on Ubuntu\" class=\"wp-image-4557\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p><br>Next, on the Network connection settings, Click Add and choose Import a saved VPN configuration under the VPN connections section.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/vpnc.png\"><img loading=\"lazy\" decoding=\"async\" width=\"535\" height=\"259\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/import-pcf-vpnc.png\" alt=\"Cisco VPN client PCF file VPNC\" class=\"wp-image-4560\" title=\"\"><\/a><\/figure>\n\n\n\n<p>Click <strong>Create<\/strong> to import your Cisco PCF configuration file. Choose the PCF file and click it to import.<\/p>\n\n\n\n<p>Once imported, you are presented with a Wizard to edit your connection. Make the necessary changes like setting the connection name, etc and click <strong>Save<\/strong> to save the changes.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/edit-vpn-con.png\"><img loading=\"lazy\" decoding=\"async\" width=\"404\" height=\"497\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/edit-vpn-con.png\" alt=\"Cisco VPN connection settings\" class=\"wp-image-4561\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>For the password settings, click the question mark on the password bar and choose how you want to be entering the connection password.<\/p>\n\n\n\n<p>Your profile is now created. Proceed to connect to the VPN.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Connect to Cisco VPN on Ubuntu Linux<\/h3>\n\n\n\n<p>To connect to the VPN after creating the profile connection, click on the Network connections icon and under the <strong>VPN Connections<\/strong>, choose the newly created VPN profile to connect to it.<\/p>\n\n\n\n<p>If you choose to enter the username password every time a connection is initiated, you will be prompted to enter a connection user password.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/connection-password.png\"><img loading=\"lazy\" decoding=\"async\" width=\"375\" height=\"228\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/connection-password.png\" alt=\"Cisco VPN client connection password\" class=\"wp-image-4562\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>If the provided credentials work, then the connection to the VPN will be established.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/vpn-connected.png\"><img loading=\"lazy\" decoding=\"async\" width=\"344\" height=\"379\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/11\/vpn-connected.png\" alt=\"Cisco VPN connection Client VPNC\" class=\"wp-image-4564\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>Once the connection is successful, you should now be able to see a tunneling interface created with IP address assigned.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ip add<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>...\n10: tun0: &lt;POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1412 qdisc pfifo_fast state UNKNOWN group default qlen 500\n    link\/none \n    inet 192.168.30.141\/25 brd 192.168.30.255 scope global tun0\n       valid_lft forever preferred_lft forever\n    inet6 fe80::90e4:ec12:6c22:3e62\/64 scope link flags 800 \n       valid_lft forever preferred_lft forever<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Other VPN Tutorials<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-configure-ipsec-vpn-using-strongswan-on-ubuntu-18-04\/\" target=\"_blank\">Configure IPSEC VPN using StrongSwan on Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-and-configure-openvpn-server-freebsd-12\/\" target=\"_blank\">Install and Configure OpenVPN Server FreeBSD 12<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-setup-openvpn-server-on-fedora-29-centos-7\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install and Setup OpenVPN Server on Fedora 29\/CentOS 7<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You want to connect to Cisco VPN using Cisco&nbsp;Systems&nbsp;VPN&nbsp;Client and you have been provided with a profile configuration&nbsp;file (PCF) file. How do you connect to<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,34,321],"tags":[1181,1183,94,1182],"class_list":["post-4550","post","type-post","status-publish","format-standard","hentry","category-howtos","category-security","category-vpn","tag-cisco-vpn","tag-cisco-vpn-client","tag-ubuntu-16-04","tag-vpnc","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4550"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=4550"}],"version-history":[{"count":8,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4550\/revisions"}],"predecessor-version":[{"id":21271,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4550\/revisions\/21271"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=4550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=4550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=4550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}