OpenVPN is the prefered VPN method to connect with SDF. OpenVPN uses Transport Layer Security (TLS) to authenticate users and encrypt communications. When SDF users register for VPN service they are issued a certificate and private key. Connecting via OpenVPN also results in users being issued a static public facing IP address for their VPN session.
The Virtual Private Network (VPN) provided by SDF has a number of uses. The most beneficial of that is to allow confidential communication over a public network. Basically, the SDF VPN will allow you (once routing is enabled) to communicate securely over an insecure connection such as a public Wireless Fidelity (Wi-Fi) network.
The major benefit of this over SSH forwarding/tunneling is that it is much easier to configure and automatically tunnels all connections leaving your computer, and not just those specifically configured for forwarding. Some may see this as a negative aspect of the VPN, however.
Registration instructions and VPN dues are found by running the vpn command from an SDF login session.
Before proceeding please mind the following note.
NEVER send your private key to anyone in an email message. | |
NEVER post your private key in a bboard posting, online forum, or chat session. |
You will receive your OpenVPN certificate via SDF internal email for both the USA and EU server. If you lose this email, you must make post on the internal bboard:REQUESTS to have them reissued. You may use either server when it suits you. The server addresses are:
The email message from the SDF administrator will contain:
You must extract each of the certificates and the private key from the email message. You must also create an OpenVPN configuration file.
One thing to note about the OpenVPN configuration file that you may receive with your email: If the line that begins with remote follows with 192.94.73.x (where x will be the number you're assigned to) you'll need to change that to 205.166.94.x. This is because the sdf IP block had to change near the end of 2016. This may have been corrected on emails sent since the change.
Let us assume that the SDF CA has been saved into a file called sdf.ca. Let us also assume that your user certificate has been saved into a file called yourCert.crt. You can use openssl to verify the extraction steps have been performed correctly.
$openssl verify -CAfile sdf.ca yourCert.crt yourCert.crt:OK $openssl x509 -noout -serial -fingerprint -subject -in sdf.ca serial=88FF6DD2D8A905FE SHA1 Fingerprint=BA:26:E0:3C:25:10:80:CF:FA:51:2B:05:A1:81:AD:C7:48:94:07:74 subject= /C=US/ST=WA/L=SEATTLE/O=sdf.org/CN=sdf.org CA/emailAddress=smj@sdf.org $openssl x509 -noout -serial -fingerprint -subject -in yourCert.crt serial=YOUR_SERIAL_NUMBER SHA1 Fingerprint=YOUR_CERT_FINGERPRINT subject= /C=US/ST=WA/L=SEATTLE/O=sdf.org/CN=YOUR_USER_NAME@sdf.org/emailAddress=smj@sdf.org
These instructions were created using OpenWRT Bleeding Edge, r33132.
Run the following command to install openvpn with opkg:
root@OpenWrt:~# opkg install openvpn
PPTP is a legacy method to connect to the SDF VPN. Dynamic IP addresses are assigned if you use this method.
The Virtual Private Network (VPN) provided by SDF has a number of uses. The most beneficial of that is to allow confidential communication over a public network. Basically, the SDF VPN will allow you (once routing is enabled) to communicate securely over an insecure connection such as a public Wireless Fidelity (Wi-Fi) network.
The major benefit of this over SSH forwarding/tunneling is that it is much easier to configure and automatically tunnels all connections leaving your computer, and not just those specifically configured for forwarding. Some may see this as a negative aspect of the VPN, however.
The SDF VPN is quite easy to set up. You must first choose a VPN plan that is right for you, based on assumed bandwidth usage. Pricing and more package information is available through the shell by typing ‘vpn’ without the quotes.
Once you've been added to the VPN membership level (you'll receive an email notification of this), you must set up your VPN access by typing ‘setvpn’ in the shell, without quotes. This will allow you to configure your VPN secret (password) for connecting.
You should make note of the VPN's IP address when setting up your secret.
Once you've configured your VPN account, it's time to connect. Continue reading below for step-by-step instructions on connecting to the VPN.
Connecting to the VPN is slightly different in Windows Vista. Please use these instructions to connect to SDF's VPN through Vista.
remotename sdfpptp linkname sdfpptp ipparam sdfpptp pty "pptp --loglevel 0 **//IP Address//** --nolaunchpppd" name **//username//** refuse-eap refuse-pap refuse-chap refuse-mschap require-mppe nomppe-stateful require-mppe-128 nomppe-40 noauth nodetach lock bsdcomp 9,15 deflate 9,15 idle 0
#!/bin/bash SDFVPNHOST=**//IP Address//** RT=`ip route get $SDFVPNHOST | head -1` DEV=`echo $RT | awk '{while ($num != "dev") {num++}{print $(num+1)}}'` VIA=`echo $RT | awk '{while ($num != "via") {num++}{print $(num+1)}}'` ip route add $SDFVPNHOST via $VIA dev $DEV ip route add $SDFVPNHOST via $VIA dev $DEV table sdftun pppd call sdfpptp ip route del $SDFVPNHOST via $VIA dev $DEV ip route del $SDFVPNHOST via $VIA dev $DEV table sdftun
Any of the newer Linux distros that use NetworkManager (Debian, Ubuntu, Fedora, etc.) on their default desktops have a GUI interface to PPTP VPN configuration. You'll need to install a package to get this capability (although this now seems to be included in the latest Ubuntu 10.10 release):
Fedora:
yum install NetworkManager-pptp
Debian/Ubuntu:
apt-get install network-manager-pptp
Once installed, restart the NetworkManager service (/etc/init.d/NetworkManager restart) and left-click on the network manager icon in your taskbar. Highlight VPN Connections and click on Configure VPN:
Click on the Add button, and choose Point-to-Point Tunneling Protocol (PPTP), then click Create. Fill out the User name, Password and Gateway fields with appropriate values (from when you ran setvpn):
Now click on Advanced:
Under Authentication, de-select all the methods except MSCHAPv2. Then select Use Point-to-Point Encryption (MPPE) and choose 128-bit (most secure) in the Security dropdown. Click OK, then Apply and close all other configuration dialogs. Now when you left-click on the network manager icon, you should have your PPTP VPN listed under VPN Connections. Just select it and wait. If it is successful, you'll see a little lock icon appear over the usual network manager icon. If not, check your system log for errors. This will be /var/log/messages or /var/log/syslog, depending on your distro.
If you use network manager, all traffic will be routed through the PPTP VPN for you once you are connected. If that's not what you want, you can click on IPV4 Settings and then Routes to have simple static routes added for you automatically when the VPN connects. You can also check Use this connection only for resources on this network, which in our case means only connections to SDF hosts will be encrypted.
OpenWRT provides both a kernelspace and userspace method for connecting to PPTP networks as a client. The userspace and kernelspace methods are both outlined below, you only need to use one of them to start a connection. This documentation was created using OpenWRT Bleeding Edge (r33006), so older versions may have trouble. The full OpenWRT PPTP Client documentation can be found on the OpenWRT wiki here: http://wiki.openwrt.org/doc/howto/vpn.client.pptp
For this setup you'll need to install the following kernel module packages: kmod-pptp, kmod-mppe.
#### VPN configuration config 'interface' 'vpn' option 'ifname' 'pptp-vpn' option 'proto' 'pptp' option 'username' 'USERNAME' option 'password' 'PASSWORD' option 'server' 'SDF.VPN.IP.ADDRESS' option 'buffering' '1' option 'defaultroute' '0'
noipdefault nodefaultroute maxfail 0 debug plugin "/usr/lib/pppd/2.4.5/pptp.so" refuse-eap refuse-pap refuse-chap refuse-mschap mppe required,stateless noauth nodetach bsdcomp 9,15 deflate 9,15 idle 0
pptp-vpn Link encap:Point-to-Point Protocol inet addr:192.94.73.44 P-t-P:192.94.73.25 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1460 Metric:1 RX packets:21 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:1159 (1.1 KiB) TX bytes:128 (128.0 B)
mpd4
from ports or packages./usr/local/etc/mpd4/mpd4.conf
: sdfvpn: new -i ng1 sdfvpn sdfvpn set iface disable on-demand set iface idle 0 # disconnect the client after 8 hours set iface session 28800 set iface route 10.0.0.0/24 set iface route default set bundle disable multilink set auth authname "USERNAME" set auth password "PASSWORD" set link yes acfcomp protocomp set link no eap set link no pap set link accept chap set link mtu 1460 set link keep-alive 10 75 set ipcp yes vjcomp set ipcp ranges 0.0.0.0/0 set ipcp yes req-pri-dns req-sec-dns # # The five lines below enable Microsoft Point-to-Point encryption # (MPPE) using the ng_mppc(8) netgraph node type. # set bundle yes compression set ccp yes mppc set ccp yes mpp-compress set ccp yes mpp-e128 #set bundle accept crypt-reqd set ccp yes mpp-stateless open
/etc/hosts
on SDF. The local IP will start with 10.0.0, but have the same last octet as the public IP./usr/local/etc/mpd4/mpd4.links
file: sdfvpn: set link type pptp set pptp peer set pptp enable originate outcall set pptp disable incoming
setvpn
at the shell.mpd4 sdfvpn
.Viscosity is an OpenVPN client for Mac and Windows
That's it! Hit Save, and you're ready to roll securely through the SDF VPN.
Now that you have your VPN configured to connect, make sure that you don't forget to use it! Using the VPN while connected through a public access network (or even your home network!) will tunnel all connections through SDF and out to the Internet (once routing is enabled). Please make sure to use the VPN responsibly, as all actions and activity will be traced back to SDF.Enjoy!
SDF's VPN servers - traditional link (using RCS)