Tuesday 30 September 2014

Configure 802.1X Auth Mechanism using CLI in Linux

 
Connecting to a LAN network that uses 802.1x and EAPOL using the command line interface.

First, you would need to setup a wpa_supplicant.conf config file as shown below.

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=users
ap_scan=0
fast_reauth=1
network={
    key_mgmt=IEEE8021X
    eap=PEAP
    phase2="auth=MSCHAPV2"
    identity="IDENTITY"
    password="PASSWORD"
}

And that's pretty much it! All you need to do now is run this command:
 
wpa_supplicant -D wired -i eth0 -dd -c /path/to/config/file  #Replace eth0 with your ethernet interface

This could take a few seconds to run but should end with an authentication successful message, if not, try to find the place where it fails and try to debug it.

Once this is ready, you need to request for an ip address, run the following command.
 
dhclient eth0
And you're done!

Install Plugins from .zip Eclipse

Sometime, Eclipse doesn't exactly update quickly from update sites for installing plugins. This could be a problem especially when you're stuck behind a proxy! So, here's a way to manually install a plugin from a zip.
Note that most plugin writers don't always include the zip, in that case, you may have to try alternate methods to obtain it.

So these are the steps involved in manually installing the plugin-

1. First unzip the file. If the unzipped folder contains content.jar and artifacts.jar, you must be able to import it directly into eclipse from | Help > Install New Software > Add > Archive | .
2. If the above method fails, which happened in my case, unzip the file into a directory and move the directory into /path/to/eclipse/dropins directory. Name of the unzipped folder does not matter.
3. After moving the folder there, restart your eclipse and the plugin must be working now!

You can verify that the plugin is installed by doing | Help > About Eclipse > Installation Details > Installed Software |.

Hope this helps!