<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://vtluug.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2601%3A8%3A2000%3A2B5%3AC827%3AA41B%3A8D4F%3A1E22</id>
	<title>Linux and Unix Users Group at Virginia Teck Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://vtluug.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=2601%3A8%3A2000%3A2B5%3AC827%3AA41B%3A8D4F%3A1E22"/>
	<link rel="alternate" type="text/html" href="https://vtluug.org/wiki/Special:Contributions/2601:8:2000:2B5:C827:A41B:8D4F:1E22"/>
	<updated>2026-05-06T05:52:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://vtluug.org/w/index.php?title=VPN&amp;diff=1531</id>
		<title>VPN</title>
		<link rel="alternate" type="text/html" href="https://vtluug.org/w/index.php?title=VPN&amp;diff=1531"/>
		<updated>2014-09-04T02:52:37Z</updated>

		<summary type="html">&lt;p&gt;2601:8:2000:2B5:C827:A41B:8D4F:1E22: Fixed uniluug issue&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Connecting to the Internet through Virginia Tech's [http://en.wikipedia.org/wiki/Virtual_private_network  Virtual Private Network] (VPN) is the only officially advertised and supported method of accessing certain resources such as [http://network.software.vt.edu/ VT Network Software] from off-campus. Alternatively, you can use SSH tunnels or [[proxies]] to obtain a Virginia Tech IP address.&lt;br /&gt;
&lt;br /&gt;
'''Important:''' You must first create a [http://answers.vt.edu/kb/entry/3765 Remote Access ID] to be able to log into the VPN. This is different from your normal VT PID password. This is the Network Account information on your [https://my.vt.edu/accounts/myaccounts Accounts page].&lt;br /&gt;
&lt;br /&gt;
== pptpclient ==&lt;br /&gt;
Tested on [[Arch Linux]] with pptpclient 1.7.2 (updated on 2011-08-28).&lt;br /&gt;
&lt;br /&gt;
* Ensure that you have both '''ppp''' and '''pptpclient''' installed. Otherwise, you may receive strange errors or otherwise be unable to connect.&lt;br /&gt;
* Create the file '''/etc/ppp/peers/{{{peername}}}''' with the following:&lt;br /&gt;
 remotename {{{peername}}}&lt;br /&gt;
 pty &amp;quot;pptp {{{host}}} --nolaunchpppd&amp;quot;&lt;br /&gt;
 name username&lt;br /&gt;
 file /etc/ppp/options.pptp&lt;br /&gt;
 require-mppe-128&lt;br /&gt;
 ipparam {{{peername}}}&lt;br /&gt;
Make sure to replace '''username''' with your username.&lt;br /&gt;
* Edit the file '''/etc/ppp/chap-secrets''' and add the following line to the bottom, replacing '''username''' with your username and '''password''' with your password:&lt;br /&gt;
 username {{{peername}}} password *&lt;br /&gt;
* To connect, use the pon script:&lt;br /&gt;
 sudo pon {{{peername}}}&lt;br /&gt;
* To disconnect, use poff:&lt;br /&gt;
 sudo poff {{{peername}}}&lt;br /&gt;
&lt;br /&gt;
== Network Manager ==&lt;br /&gt;
Tested on [[Fedora]] 15 (updated on 2011-08-28).&lt;br /&gt;
Tested on [[Ubuntu]] 12.04 LTS (2012-05-22)&lt;br /&gt;
&lt;br /&gt;
* Install the '''networkmanager-pptp''' package. (Ubuntu users can skip this step.)&lt;br /&gt;
* Right click on the Network Manager applet and select Edit Connections...&lt;br /&gt;
* Select the VPN tab and click Add.&lt;br /&gt;
* Select '''Point-to-Point Tunneling Protocol (PPTP)''' and click Create...&lt;br /&gt;
* Enter '''{{{peername_full|{{{peername}}}}}}''' for the connection name.&lt;br /&gt;
* Enter '''{{{host}}}''' for the gateway.&lt;br /&gt;
* Enter your username and remote access passphrase (in the password field), leaving NT domain blank.&lt;br /&gt;
* Click Save...&lt;br /&gt;
* Left click on the Network Manager applet, and select '''{{{peername_full|{{{peername}}}}}}''' under VPN Connections.&lt;br /&gt;
&lt;br /&gt;
[[Category:Howtos]] [[Category:Campus computing resources]]&lt;/div&gt;</summary>
		<author><name>2601:8:2000:2B5:C827:A41B:8D4F:1E22</name></author>
		
	</entry>
	<entry>
		<id>https://vtluug.org/w/index.php?title=IPsec&amp;diff=3701</id>
		<title>IPsec</title>
		<link rel="alternate" type="text/html" href="https://vtluug.org/w/index.php?title=IPsec&amp;diff=3701"/>
		<updated>2014-09-04T02:50:07Z</updated>

		<summary type="html">&lt;p&gt;2601:8:2000:2B5:C827:A41B:8D4F:1E22: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Network-to-Network==&lt;br /&gt;
For purposes of this tutorial, we are setting up two endpoints, '''vpn1''' and '''vpn2''', both using IPv6 with the subnets '''2001:db8:1::/64''' and '''2001:db8:2::/64''', respectively.&lt;br /&gt;
&lt;br /&gt;
===Linux with OpenSWAN===&lt;br /&gt;
Tested with OpenSWAN 2.6.28 on Debian Squeeze (updated on 2012-02-25).&lt;br /&gt;
&lt;br /&gt;
* Generate a new host key on both endpoints:&lt;br /&gt;
 sudo ipsec newhostkey --output /etc/ipsec.secrets&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on '''vpn1''':&lt;br /&gt;
 config setup&lt;br /&gt;
     protostack=netkey&lt;br /&gt;
     nat_traversal=off&lt;br /&gt;
 &lt;br /&gt;
 conn vpn2&lt;br /&gt;
     authby=rsasig&lt;br /&gt;
     connaddrfamily=ipv6&lt;br /&gt;
     type=tunnel&lt;br /&gt;
     left=vpn1.example.com&lt;br /&gt;
     leftid=@vpn1.example.com&lt;br /&gt;
     leftsubnet=2001:db8:1::/64&lt;br /&gt;
     leftrsasigkey=0s...&lt;br /&gt;
     right=vpn2.example.com&lt;br /&gt;
     rightid=@vpn2.example.com&lt;br /&gt;
     rightsubnet=2001:db8:2::/64&lt;br /&gt;
     rightrsasigkey=0s...&lt;br /&gt;
     ike=aes256-sha1-modp2048&lt;br /&gt;
     forceencaps=yes&lt;br /&gt;
     auto=start&lt;br /&gt;
Make sure to change '''leftrsasigkey''' to the public key of the RSA key that was generated in the above command, which can be found in '''/etc/ipsec.secrets'''. Replace '''rightrsasigkey''' with the RSA generated by the above command on the other endpoint, which can be found in the same location.&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on '''vpn2''':&lt;br /&gt;
 config setup&lt;br /&gt;
     protostack=netkey&lt;br /&gt;
     nat_traversal=off&lt;br /&gt;
 &lt;br /&gt;
 conn vpn1&lt;br /&gt;
     authby=rsasig&lt;br /&gt;
     connaddrfamily=ipv6&lt;br /&gt;
     type=tunnel&lt;br /&gt;
     left=vpn2.example.com&lt;br /&gt;
     leftid=@vpn2.example.com&lt;br /&gt;
     leftsubnet=2001:db8:2::/64&lt;br /&gt;
     leftrsasigkey=0s...&lt;br /&gt;
     right=vpn1.example.com&lt;br /&gt;
     rightid=@vpn1.example.com&lt;br /&gt;
     rightsubnet=2001:db8:1::/64&lt;br /&gt;
     rightrsasigkey=0s...&lt;br /&gt;
     ike=aes256-sha1-modp2048&lt;br /&gt;
     forceencaps=yes&lt;br /&gt;
     auto=start&lt;br /&gt;
Make sure to change '''leftrsasigkey''' to the public key of the RSA key that was generated in the above command, which can be found in '''/etc/ipsec.secrets'''. Replace '''rightrsasigkey''' with the RSA generated by the above command on the other endpoint, which can be found in the same location.&lt;br /&gt;
&lt;br /&gt;
* After configuring OpenSWAN, restart the daemon on each endpoint and your tunnels should be established after a minute or two.&lt;br /&gt;
&lt;br /&gt;
===OpenBSD===&lt;br /&gt;
Tested on [[OpenBSD]] 5.0 (updated on 2012-02-25).&lt;br /&gt;
&lt;br /&gt;
* Setting up IPsec on OpenBSD is a fairly straightforward task due to improvements in recent releases. Enabling it is as simple as changing the following in your '''/etc/rc.conf''':&lt;br /&gt;
&amp;lt;pre&amp;gt;isakmpd_flags=&amp;quot;-K&amp;quot;&lt;br /&gt;
ipsec=YES&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on '''vpn1''':&lt;br /&gt;
 ike esp from 2001:db8:1::/64 to 2001:db8:2::/64 \&lt;br /&gt;
     peer vpn2.example.com \&lt;br /&gt;
     main auth hmac-sha2-256 enc aes-256 group modp2048 \&lt;br /&gt;
     quick auth hmac-sha2-256 enc aes-256 group modp2048 \&lt;br /&gt;
     srcid vpn1.example.com tag ipsec-vpn1&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on '''vpn2''':&lt;br /&gt;
 ike esp from 2001:db8:2::/64 to 2001:db8:1::/64 \&lt;br /&gt;
     peer vpn1.example.com \&lt;br /&gt;
     main auth hmac-sha2-256 enc aes-256 group modp2048 \&lt;br /&gt;
     quick auth hmac-sha2-256 enc aes-256 group modp2048 \&lt;br /&gt;
     srcid vpn2.example.com tag ipsec-vpn1&lt;br /&gt;
&lt;br /&gt;
* We will be using RSA public key authentication, similar to what is commonly done with SSH, here. When you installed OpenBSD, the file '''/etc/isakmpd/local.pub''' was generated. This file will need to be copied to the other endpoint and vice versa. To set this up on vpn1, simply copy '''/etc/isakmpd/local.pub''' on '''vpn1''' to '''/etc/isakmpd/pubkeys/fqdn/vpn1.example.com''' on '''vpn2'''. Next do this process in reverse for '''vpn2'''.&lt;br /&gt;
&lt;br /&gt;
* After you make the necessary changes, starting IPsec is simply a matter of running the following command on each endpoint to start your tunnels:&lt;br /&gt;
 sudo /etc/rc.d/isakmpd start&lt;br /&gt;
 sudo ipsecctl -f /etc/ipsec.conf&lt;br /&gt;
&lt;br /&gt;
The changes we made to rc.conf above ensure that your IPsec tunnels will be reestablished on boot.&lt;br /&gt;
&lt;br /&gt;
==Roadwarrior==&lt;br /&gt;
===Linux with OpenSWAN===&lt;br /&gt;
Tested with OpenSWAN 2.6.37 on Arch Linux (updated on 2012-06-27).&lt;br /&gt;
&lt;br /&gt;
* Generate a new host key on both endpoints:&lt;br /&gt;
 sudo ipsec newhostkey --output /etc/ipsec.secrets&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on your VPN server:&lt;br /&gt;
 config setup&lt;br /&gt;
     protostack=netkey&lt;br /&gt;
     nat_traversal=on&lt;br /&gt;
 &lt;br /&gt;
 conn myvpn&lt;br /&gt;
     authby=rsasig&lt;br /&gt;
     connaddrfamily=ipv6&lt;br /&gt;
     type=tunnel&lt;br /&gt;
     left=vpn1.example.com&lt;br /&gt;
     leftid=@vpn1.example.com&lt;br /&gt;
     leftsubnet=2001:db8:1::/64&lt;br /&gt;
     leftrsasigkey=0s...&lt;br /&gt;
     right=%any&lt;br /&gt;
     rightid=@vpn2.example.com&lt;br /&gt;
     rightsubnet=2001:db8:2::/64&lt;br /&gt;
     rightrsasigkey=0s...&lt;br /&gt;
     ike=aes256-sha1-modp2048&lt;br /&gt;
     forceencaps=yes&lt;br /&gt;
     auto=start&lt;br /&gt;
Make sure to change '''leftrsasigkey''' to the public key of the RSA key that was generated in the above command, which can be found in '''/etc/ipsec.secrets'''. Replace '''rightrsasigkey''' with the RSA generated by the above command on the other endpoint, which can be found in the same location.&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on the machine that will connect to your VPN:&lt;br /&gt;
 config setup&lt;br /&gt;
     protostack=netkey&lt;br /&gt;
     nat_traversal=on&lt;br /&gt;
 &lt;br /&gt;
 conn vpn1&lt;br /&gt;
     authby=rsasig&lt;br /&gt;
     connaddrfamily=ipv6&lt;br /&gt;
     type=tunnel&lt;br /&gt;
     left=%defaultroute&lt;br /&gt;
     leftid=@vpn2.example.com&lt;br /&gt;
     leftsubnet=2001:db8:2::1/128&lt;br /&gt;
     leftsourceip=2001:db8:2::1&lt;br /&gt;
     leftrsasigkey=0s...&lt;br /&gt;
     right=vpn1.example.com&lt;br /&gt;
     rightid=@vpn1.example.com&lt;br /&gt;
     rightsubnet=2001:db8:1::/64&lt;br /&gt;
     rightrsasigkey=0s...&lt;br /&gt;
     ike=aes256-sha1-modp2048&lt;br /&gt;
     forceencaps=yes&lt;br /&gt;
     auto=start&lt;br /&gt;
Make sure to change '''leftrsasigkey''' to the public key of the RSA key that was generated in the above command, which can be found in '''/etc/ipsec.secrets'''. Replace '''rightrsasigkey''' with the RSA generated by the above command on the other endpoint, which can be found in the same location.&lt;br /&gt;
&lt;br /&gt;
* After configuring OpenSWAN, restart the daemon on each endpoint and your tunnels should be established after a minute or two.&lt;br /&gt;
&lt;br /&gt;
===OpenBSD===&lt;br /&gt;
Tested on [[OpenBSD]] 5.1 (updated on 2012-06-27).&lt;br /&gt;
&lt;br /&gt;
* Setting up IPsec on OpenBSD is a fairly straightforward task due to improvements in recent releases. Enabling it is as simple as changing the following in your '''/etc/rc.conf''':&lt;br /&gt;
&amp;lt;pre&amp;gt;isakmpd_flags=&amp;quot;-K&amp;quot;&lt;br /&gt;
ipsec=YES&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on your VPN server:&lt;br /&gt;
 ike esp from 2001:db8:1::/64 to 2001:db8:2::1 \&lt;br /&gt;
     peer any \&lt;br /&gt;
     main auth hmac-sha2-256 enc aes-256 group modp2048 \&lt;br /&gt;
     quick auth hmac-sha2-256 enc aes-256 group modp2048 \&lt;br /&gt;
     srcid vpn1.example.com tag ipsec-vpn1&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on the machine that will connect to your VPN:&lt;br /&gt;
 ike esp from 2001:db8:2::1 to 2001:db8:1::/64 \&lt;br /&gt;
     peer vpn1.example.com \&lt;br /&gt;
     main auth hmac-sha2-256 enc aes-256 group modp2048 \&lt;br /&gt;
     quick auth hmac-sha2-256 enc aes-256 group modp2048 \&lt;br /&gt;
     srcid vpn2.example.com tag ipsec-vpn1&lt;br /&gt;
&lt;br /&gt;
* We will be using RSA public key authentication, similar to what is commonly done with SSH, here. When you installed OpenBSD, the file '''/etc/isakmpd/local.pub''' was generated. This file will need to be copied to the other endpoint and vice versa. To set this up on vpn1, simply copy '''/etc/isakmpd/local.pub''' on '''vpn1''' to '''/etc/isakmpd/pubkeys/fqdn/vpn1.example.com''' on '''vpn2'''. Next do this process in reverse for '''vpn2'''.&lt;br /&gt;
&lt;br /&gt;
* After you make the necessary changes, starting IPsec is simply a matter of running the following command on each endpoint to start your tunnels:&lt;br /&gt;
 sudo /etc/rc.d/isakmpd start&lt;br /&gt;
 sudo ipsecctl -f /etc/ipsec.conf&lt;br /&gt;
&lt;br /&gt;
The changes we made to rc.conf above ensure that your IPsec tunnels will be reestablished on boot.&lt;br /&gt;
&lt;br /&gt;
===Linux with OpenSWAN (laptop) to OpenBSD (router)===&lt;br /&gt;
Tested on [[OpenBSD]] 5.1 (updated on 2012-06-27).&lt;br /&gt;
&lt;br /&gt;
Assume router has an IPv4 only hostname of home.example.org and you want to route the IPv6 subnet 2001:420:1:9A8::/64&lt;br /&gt;
Assume the laptop is called laptop.example.org (does not have to be an actuall DNS entry) and will round the org-local subnet fd20:50::1/128 (which is actually just 1 ip)&lt;br /&gt;
&lt;br /&gt;
* Setting up IPsec on OpenBSD is a fairly straightforward task due to improvements in recent releases. Enabling it is as simple as changing the following in your '''/etc/rc.conf''':&lt;br /&gt;
&amp;lt;pre&amp;gt;isakmpd_flags=&amp;quot;-K&amp;quot;&lt;br /&gt;
ipsec=YES&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on '''home.example.org''':&lt;br /&gt;
 ike esp from 2001:420:1:9A8::/64 to fd20:50::1/128 \&lt;br /&gt;
     peer any \&lt;br /&gt;
     main auth hmac-sha1 enc aes-256 group modp2048 \&lt;br /&gt;
     quick auth hmac-sha1 enc aes-256 group modp2048 \&lt;br /&gt;
     srcid home.example.org tag ipsec-vpn1&lt;br /&gt;
&lt;br /&gt;
* Generate a new host key on '''laptop.example.org''':&lt;br /&gt;
 sudo ipsec newhostkey --output /etc/ipsec.secrets&lt;br /&gt;
&lt;br /&gt;
* Configure '''/etc/ipsec.conf''' on '''laptop.example.org''':&lt;br /&gt;
 config setup&lt;br /&gt;
     protostack=netkey&lt;br /&gt;
     nat_traversal=off&lt;br /&gt;
 &lt;br /&gt;
 conn vpn2&lt;br /&gt;
   authby=rsasig&lt;br /&gt;
   connaddrfamily=ipv6&lt;br /&gt;
   type=tunnel&lt;br /&gt;
   left=%defaultroute&lt;br /&gt;
   leftid=@laptop.example.org&lt;br /&gt;
   leftsubnet=fd20:50::1/128&lt;br /&gt;
   leftsourceip=fd20:50::1&lt;br /&gt;
   leftrsasigkey=&amp;lt;laptop_pubkey&amp;gt; # from /etc/ipsec.secrets on '''laptop.example.org'''&lt;br /&gt;
   right=home.example.org&lt;br /&gt;
   rightid=@home.example.org&lt;br /&gt;
   rightsubnet=2001:420:1:9A8::/64&lt;br /&gt;
   rightrsasigkey=&amp;lt;server_pubkey&amp;gt; # converted later from key on '''home.example.org'''&lt;br /&gt;
   ike=aes256-sha1-modp2048&lt;br /&gt;
   forceencaps=yes&lt;br /&gt;
   auto=start&lt;br /&gt;
&lt;br /&gt;
The trickiest part (and its not actually *that* tricky) is to convert the the pubkey on Linux to the format OpenBSD uses, and vice versa. There is a handy perl script found [http://pastebin.com/THUf4Dsg here] that takes in a Linux or OpenBSD formated pubkey in stdin and outputs a OpenBSD or Linux formated pubkey.&lt;br /&gt;
&lt;br /&gt;
On OpenBSD the pubkey is found in '''/etc/isakmpd/local.pub''' and in Linux it is found in /etc/ipsec.secrets. In ipsec.secrets, you will find a public key like:&lt;br /&gt;
 #pubkey=0s...&lt;br /&gt;
&lt;br /&gt;
* To convert this to OpenBSD format, run&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;: PUB 0s...&amp;quot; | ./ipsec.pl&lt;br /&gt;
&lt;br /&gt;
where 0s... is your full public key.&lt;br /&gt;
&lt;br /&gt;
* For the OpenBSD key, it is possible to pipe in local.pub like:&lt;br /&gt;
 &lt;br /&gt;
 cat local.pub | ./ipsec.pl&lt;br /&gt;
&lt;br /&gt;
* Place the output from the OpenBSD pubkey into '''/etc/ipsec.conf''' on '''laptop.example.org''' here:&lt;br /&gt;
&lt;br /&gt;
 rightrsasigkey=&amp;lt;server_pubkey&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and put the output for the Linux pubkey into '''/etc/isakmpd/pubkeys/fqdn/laptop.example.org'''&lt;br /&gt;
&lt;br /&gt;
* After you make the necessary changes, starting IPsec is simply a matter of running the following command on '''home.example.org''':&lt;br /&gt;
 sudo /etc/rc.d/isakmpd start&lt;br /&gt;
 sudo ipsecctl -f /etc/ipsec.conf&lt;br /&gt;
&lt;br /&gt;
and on '''laptop.example.org''' restart openswan (generally under the rc script name ipsec) in whatever manner perscribed by your favorite distro.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [[w:IPsec|IPsec]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Howtos]]&lt;/div&gt;</summary>
		<author><name>2601:8:2000:2B5:C827:A41B:8D4F:1E22</name></author>
		
	</entry>
</feed>