0

I recently installed Ubuntu server on my old laptop and I am trying to set up a private web hosting here (mostly as a learning experience). However, I am unable to connect the server to the internet. Can someone please help me out? The steps I took:

1) Edited /etc/network/interfaces and added:

auto wlan0
iface wlan0 inet dhcp
wireless-essid WIFI-NAME
wireless-essid WIFI-PASSWORD

2) Ran /etc/init.d/networking restart --> Nothing happened 3) Then I created a file wpa.conf with the following details

network={
    ssid="networkname"
    scan_ssid=1
    proto=WPA
    key_mgmt=WPA-PSK
    pairwise=CCMP
    group=TKIP
    psk="networkpassword"
}

4) Then ran wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf This gives some more errors such as

ioctl[SIOCSIWENCODEEXT]: Invalid argument

but finally manages to establish a connection

CTRL-EVENT-CONNECTED - Connection to xxx completed

For the first time it ran properly. After my server was idle for a while, it disconnected and isn't working now. I have an IP address (shown by ifconfig), dhclient wlan0 returns File exists but nothing works.

Can someone please help me out? Thanks.

1

If your access point is using WPA rather than WEP (I hope it is - WEP security is poor), then you need to change the keywords in the /etc/network/interfaces file accordingly:

auto wlan0
iface wlan0 inet dhcp
wpa-ssid WIFI-NAME
wpa-psk WIFI-PASSWORD

A wpa.conf file should not be necessary AFAIK.

  • Does defining these details in the interfaces file be enough for connecting to the ip? I mean if I just restart the service it would connect? Also, can I specify multiple wifi's to try from the same port? (As in wlan0 with multiple wpa-ssids) – sudshekhar Dec 20 '15 at 4:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.