Open main menu

Linux and Unix Users Group at Virginia Teck Wiki β

Changes

Virginia Tech Wifi (OLD)

13,004 bytes removed, 06:47, 4 January 2019
no edit summary
=Introduction=Since the fall of 2008, there have been two options for connecting to the Virginia Tech network by wireless card. One network, called '''VT-Wireless''', operates by means of WPA2 Enterprise and is secured with EAP/TLS. The other network, called '''VT_WLAN''', is an unsecured, captive portal wireless network. While connections to VT-Wireless are secure by default, and require no user authentication once set up, the setup has a number of steps. In contrast, setup for VT_WLAN network is negligible, but you will be required to manually authenticate each time you connect (although this can be scripted). <table style="text-align: center;" align="center" border="1" cellpadding="10"> <tr><td></td><th>VT-Wireless</th><th>VT_WLAN</th></tr><tr><th>Secure (Encrypted)<br /> Connection</th><td> yes </td><td> no</td></tr><tr><th>Setup</th><td> involved </td><td> trivial</td></tr><tr><th>Authentication</th><td> automatic </td><td> manual</td></tr></table> =VT-Wireless=The VT-Wireless network is secured by WPA with EAP/TLS encryption.This encryption mechanism is put in place through a certificateauthentication mechanism. ==Obtaining the VT-Wireless Certificate==Regardless of what program you use to make your connection, you will need to [https://netcert.cns.vt.edu/netcert/ obtain your p12 certificate and password from CNS]. Complete the form and download the p12 certificate file. Save the certificate password permanently and copy it for immediate use. You will need it in setting up your connection to VT-Wireless. ==Choosing a Network Manager==[[w:NetworkManager|NetworkManager]] is installed by default on Ubuntu and Fedora. As of fall 2009, it does not support the PKCS#12 format certificates that CNS provide out of the box, however. Converting the certificate requires some work, but the steps are outlined below. If you don't rely on NetworkManager for other kinds of connections like mobile broadband or [[Proxies and VPN|VPN]], or are having problems with NetworkManager, use Wicd instead. If you don't want or need a graphical interface, a WPA Supplicant configuration is also described below. ===Connecting by NetworkManager===The setup for NetworkManager depends on your version of the software. Please follow the instructions appropriate to your version below. In GNOME, you can right-click the NetworkManager applet icon in the panel and select "About" to find the version of NetworkManager. Ubuntu users: Version 0.6 ships with 8.04 Hardy Heron, 0.7 ships with 8.10 Intrepid Ibex and 9.04 Jaunty Jackalope, and 0.8 ships with Karmic Koala. ====NetworkManager 0.7 and 0.8========Converting the certificate to PEM certificates and keys====['''NOTE:''' The following steps are only necessary to use NetworkManager 0.7 and 0.8. NetworkManager 0.6 has a [#NetworkManager_0.6 more straightforward setup]]You will need to convert the PKCS#12 (.p12) certificate into PEM formats. We will assume your downloaded p12 file is called <code>netcert-1.p12</code> and that its password is <code>netcertpasswd</code>.Open a terminal and <code>cd</code> to the directory that contains your .p12 file. Then issue the following commands: <pre>openssl pkcs12 -in netcert-1.p12 -out vt_client_cert.pem -clcerts -nokeysopenssl pkcs12 -in netcert-1.p12 -out vt_private_key.pem -nocerts</pre> In each step, you will be prompted for the password (<code>netcertpasswd</code>) that you were issued along with your .p12 certificate. Right click and paste it in or press <code>ctrl+shift+v</code> if you're using Gnome Terminal Additionally, in the final step where you generate your private key, you will be asked to enter a password. Enter the same password that came with your p12key. '''Sources''' * [http://www.codealias.info/technotes/wpa2_eap-tls_authentication_linux_client_setup WPA2 EAP/TLS Linux client setup] ==== Make sure you have the CA Certificate ====Next, you will need to make sure you have the Thawte certificate authority certificate. In Ubuntu, you should be able to find this certificate at <code>/etc/ssl/certs/Thawte_Premium_Server_CA.pem</code>. If you can't find the certificate on your system, you can copy the text below and paste it into a new file of the same name. <pre>-----BEGIN CERTIFICATE-----MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMRuHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUIhfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JMpAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==-----END CERTIFICATE-----</pre> Left-click the NetworkManager applet and select the VT-Wireless network. <!--<a href="http://www.vtluug.org/wiki/index.php?title=Image:Nm_choose_wireless.png" class="image" title="Image:nm_choose_wireless.png"><img alt="Image:nm_choose_wireless.png" src="VT-Wireless_files/Nm_choose_wireless.html" height="255" width="313" border="0"></a>--> You will see a prompt to configure the connection. First, from the Authentication drop-down menu, select TLS. <!--<a href="http://www.vtluug.org/wiki/index.php?title=Image:Nm_choose_tls.png" class="image" title="Image:nm_choose_tls.png"><img alt="Image:nm_choose_tls.png" src="VT-Wireless_files/Nm_choose_tls.html" height="466" width="494" border="0"></a>--> Next, fill in the rest of the options: <!--<a href="http://www.vtluug.org/wiki/index.php?title=Image:Nm_vt_wireless_options.png" class="image" title="Image:nm_vt_wireless_options.png"><img alt="Image:nm_vt_wireless_options.png" src="VT-Wireless_files/Nm_vt_wireless_options.html" height="466" width="494" border="0"></a>--> <table align="center" border="1" cellpadding="5"> <tr><th>Field </th><th> Value</th></tr><tr><th>SSID</th><td>VT-Wireless</td></tr><tr><th>Wireless Security</th><td> WPA &amp; WPA2 Enterprise</td></tr><tr><th>Authentication</th><td> TLS</td></tr><tr><th>Identity</th><td>''Your VT PID''</td></tr><tr><th>User Certificate</th><td> /path/to/vt_client_cert.pem</td></tr><tr><th>CA Certificate</th><td> /etc/ssl/certs/Thawte_Premium_Server_CA.pem</td></tr><tr><th>Private Key</th><td> /path/to/vt_private_key.pem</td></tr><tr><th>Private Key Password</th><td> ''netcertpasswd''</td></tr></table>Click "Connect" and you should connect to the VT-Wireless network. ===NetworkManager 0.6===Left-click the NetworkManager applet and select VT-Wireless. Youwill be prompted to enter information about the connection. Here arethe entries you should use: <table align="center" border="1" cellpadding="5"> <tr><th>Field </th><th> Value</th></tr><tr><th>SSID</th><td>VT-Wireless</td></tr><tr><th>Wireless Security</th><td> WPA2 Enterprise</td></tr><tr><th>EAP Method</th><td> TLS</td></tr><tr><th>Key Type</th><td>Automatic (Default)</td></tr><tr><th>Phase2 Type</th><td> None (Default)</td></tr><tr><th>Identity</th><td>''Your VT PID''</td></tr><tr><th>Password</th><td> ''empty''</td></tr><tr><th>Client Certificate File</th><td> (None)</td></tr><tr><th>CA Certificate File</th><td> (None)</td></tr><tr><th>Private Key File</th><td> netcert-1.p12 <br />(the certificate downloaded<br />from VT NetCert)</td></tr><tr><th>Private Key Password</th><td> ''netcertpasswd''</td></tr></table> ==Connecting with Wicd==''The following instructions were written for Wicd 1.6.2.2 on Ubuntu 9.10 Karmic Koala. If other versions or distributions have significantly different steps, please add those instructions or make a note of the need for them on [[VTLUUG Wiki:Wanted]].'' Wicd is an alternative to NetworkManager. It has proven to be more reliable than NetworkManager for a number of users. Unlike NetworkManager, to use Wicd, you do not need to convert the PKCS#12 certificate that CNS provides to a set of PEM certificates. If you need VPN or mobile broadband functionality, don't use Wicd, though. It doesn't have those features. Follow the instructions for converting the certificate and using NetworkManager instead. To install Wicd on Debian-based systems, run <code>sudo apt-get install wicd</code>. Installing it will uninstall NetworkManager. Open Wicd, either by left clicking the tray icon or by selecting Applications->Internet->Wicd Network Manager. Allow Wicd to scan the wireless networks then check the "Automatically connect to this network" checkbox by the topmost VT-Wireless entry. (You do not need to check the boxes for every VT-Wireless entry. The screenshot below was made from a working configuration that automatically checked all of them.) [[Image:wicd_1.6.2.2.png]] Click the "Properties" button of the topmost VT-Wireless entry and enter the following information: * Check the "Use these settings for all networks sharing this essid" box.* Leave the "Use Encryption" box checked.* Select EAP-TLS from the encryption type dropdown menu.* Enter your PID into the "Identity" box.* Enter the path to your private key into the "Private Key" box, i.e. <code>/home/user/netcert/netcert-1.p12</code>.* Paste the certificate password into the "Private Key Password" box. [[Image:wicd_1.6.2.2_properties.png]] Click "OK" and your computer should be all setup to use VT-Wireless. ==Connecting by WPA Supplicant==WPA Supplicant is the preferred method of connection to WPA-secured wireless networks without a graphical interface. It supports PKCS#12 certificates. ===Editing wpa_supplicant.conf===Add the following to your <tt>/etc/wpa_supplicant.conf</tt> file (if no file exists, create it): <pre>network={ ssid="VT-Wireless" key_mgmt=WPA-EAP eap=TLS identity="PID" private_key="/PATH/TO/NETCERT.p12" private_key_passwd="PASSWORD"}</pre>Replace <code>PID</code> with your actual PID (without any trailing @vt.edu),<code>/PATH/TO/NETCERT.p12</code> with the actual path to your certificate (you canstore it in /etc/netcert) and <code>PASSWORD</code> with the certificate password given toyou when you downloaded the certificate. Note the certificate used hereshould be the original PKCS#12 file you downloaded. Reformatting the certificateis only necessary for NetworkManager. ===Running WPA Supplicant=======Ubuntu====In Ubuntu, make sure to shut down NetworkManager with: <pre>$ sudo /etc/init.d/NetworkManager stop</pre>Next, issue the following command: <pre>$ sudo wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf</pre>Confirm that you are associated with VT-Wireless <pre>$ sudo iwconfig INTERFACE</pre> where <code>INTERFACE</code> is your wireless card's device interface. Usually this is <code>wlan0</code> but depending on udev and perhaps other system features, it might appear as ath0, eth1 or something else. Run <code>sudo ifconfig -a</code> to see all your interfaces listed.If you have properly connected, you should see <code>Access Point:</code> followed by a MAC address (e.g., <code>00:0F:23:EA:4A:01</code>). If instead you see <code>Access Point: not associated</code>, try the command again. If it still fails after a couple of seconds, bring down the interface and bring it back up: <pre>$ sudo ifconfig INTERFACE down$ sudo ifconfig INTERFACE up</pre> and re-issue the <code>wpa_supplicant</code> command.Next, obtain an IP address. In Ubuntu, this is done with <pre>$ sudo dhclient INTERFACE</pre> If all goes well, you'll obtain an IP address. Otherwise, you'll receive a timeout for your DHCP request. ====Gentoo====If you're already using wpa_supplicant, just restart your interface after editing <code>wpa_supplicant.conf</code>: <pre># /etc/init.d/wlan0 restart</pre> This should connect you. If you're not using wpa_supplicant, you'll need to migrate from Wireless Tools to it in order to use WPA. Refer to the [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&amp;chap=4#doc_chap2 Gentoo documentation] for a step-by-step guide to setting up WPA Supplicant. =Network Information Sources=* REDIRECT [http://www.cns.vt.edu/html/wireless/wlan/index.html Communications Network Services: Wireless LAN]* [http://computing.vt.edu/internet_and_web/internet_access/ipaddresses.html Virginia Tech IP Addresses] [[Category:Howtos]][[Category:Campus computing resourcesWifi]]