Currently there are instructions for wireless network for many operating systems (in particular for Ubuntu read here). Instead, for wired connection there are this guides for Windows XP and Windows Vista.
The instructions to follow (just in the first part) to set internet wired connection with Ubuntu are identical to instructions for wireless network:
Prerequisite for configuring and using the connection is the installation of:To create wpa_supplicant.conf in a terminal launch the command:
- openssl http://www.openssl.org/
- wpa_supplicant http://hostap.epitest.fi/wpa_supplicant/
After the download from ASI web site the certificate file must be extracted in another certificate file in PEM format. It's possible to do this by launching this command:
openssl pkcs12 -cacerts -in CertificatoASI.p12 -out asi.cerBoth certificate files (CertificatoASI.p12 and asi.cer) must be copied in some convenient position (like /etc/) and must be readable to user.
You must create the configuration file for wpa_supplicant (es. /etc/wpa_supplicant.conf).
sudo gedit /etc/wpa_supplicant.conf
The file must be structured like this model:
###
# wpa_supplicant.conf
##
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=0
network={
proto=WPA
key_mgmt=WPA-EAP
auth_alg=OPEN
pairwise=TKIP
eap=TLS
anonymous_identity="SXXXXXX"
ca_cert="/etc/asi.cer"
private_key="/etc/CertificatoASI.p12"
private_key_passwd="PASSWORD"
phase2="auth=MSCHAPV2"
}
##
# fine wpa_supplicant.conf
##
Instead of X in SXXXXXX it must be indicated your matricola (you ID number for the university, so for example: S681612) and instead of PASSWORD it must be indicated the password of the certificate file chosen during download phase.
Once wpa_supplicant.conf is saved and the wire is connected to the PC, you must activate the interface (usually eth0) related to wired connection:
sudo ifconfig eth0 up
After that you launch the command for authentication with wpa_supplicant:
sudo wpa_supplicant -i eth0 -D wired -c /etc/wpa_supplicant.conf -dThen the terminal will show a list of calls related to the authentication procedure. If authentication is completed successfully between last rows there will be some like these:
[...]
EAP: EAP entering state SUCCESS
CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully
EAPOL: SUPP_BE entering state RECEIVE
EAPOL: SUPP_BE entering state SUCCESS
EAPOL: SUPP_BE entering state IDLE
EAPOL: authWhile --> 0
EAPOL: startWhen --> 0
EAPOL: idleWhile --> 0
[...]
Once authentication is completed you must request IP address launching the following command in a new tab of the terminal (keeping opened the previous one):
sudo dhclient eth0After the insertion of the password, if the procedure conclude successfully, on the screen it will appear something like this:
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/00:13:d4:c1:f2:b1
Sending on LPF/eth0/00:13:d4:c1:f2:b1
Sending on Socket/fallback
DHCPREQUEST of 10.162.134.150 on eth0 to 255.255.255.255 port 67
DHCPACK of 10.162.134.150 from 10.162.134.254
bound to 10.162.134.150 -- renewal in 1645 seconds.
At this point configuration is finished and internet connection is active. Throughout the connection you must not close the terminal window in which it has been launched the authentication command wpa_supplicant, else you will redo the procedure.
For further informations about wpa_supplicant in a terminal launch the command man wpa_supplicant or man wpa_supplicant.conf.
UPDATE after for italian comment
To avoid all the connection procedure, after the above complete configuration, you can modify the file /etc/network/interfaces and enable auto-connection. Add this rows to the file:
auto eth0
iface eth0 inet dhcp
wpa-driver wired
wpa-conf /etc/wpa_supplicant.conf
Then kill the active wpa_supplicant process and then launch the command:
sudo /etc/init.d/networking restartModifications will be applied and now to enable internet connection you just have to start the OS and plug the cable.
0 comments:
Post a Comment