Yes
No
Somewhat
Hi there, I have a problem that I've tried resolving for myself and with helpful posts from dmizer in another thread.
I've been on this now for about a week (which makes me wonder if it's worth it lol).
Basically, after a lot of struggling, I managed to get wpa_supplicant to connect to the internet after a fashion.
What's happening is this:
My wifi access point is WPA2-TKIP and usually has the SSID hidden.
I couldn't connect with a hidden ssid so I set it to show SSID.
Now, I've followed the guide at the start of this thread as dmizer suggested and have rebooted and what happens when you reboot is about halfway through boot up, it slows down and looks for DHCPREQUEST and finds nothing.
So when ubuntu is booted I tried running this in terminal:
but it tells me there is another instance of wpa_supplicant running in var/run and it may not have terminated correctly.Code:sudo wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 dhclinet wlan0
So I go to var/run and in there is a wpa_supplicant folder and a file called wpa_supplicant.wlan0.pid
So in terminal I kill the process id and then run
which then runs and I get internet.Code:sudo wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 dhclinet wlan0
I cant understand what's going on.
here is my wpa_supplicant.conf
and here is my interfaces fileCode:ctrl_interface=/var/run/wpa_supplicant #ap_scan=1 network={ ssid="myssidhere" scan_ssid=1 proto=RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="mypasskey" }
If anyone can shed some light on why the wireless conenction is not starting and connecting properly when ubuntu starts up, please share =)Code:auto lo iface lo inet loopback auto wlan0 iface wlan0 inet dhcp wpa-driver wext wpa-ssid myssidhere wpa-ap-scan 1 wpa-proto RSN wpa-pairwise CCMP wpa-group CCMP wpa-key-mgmt WPA-PSK wpa-psk 8b79c14a1311970############################## pre-up wpa_supplicant -Dwext -wlan0 -BW -c/etc/wpa_supplicant wpa_supplicant.conf post-down killall -q wpa_supplicant
Many thanks,
(A slightly bauld from hair pulling) Mike.
EDIT: The reason I'm doing things this way is:
A) I need WPA2-TKIP security and
B) NetworkManager does not let me run lan and wifi connections together which I need to do to share the internet that comes in via the wireless to other computers via the lan connection.
So far I haven't even gotten to the lan side of things yet, I'm still trying to get a stable WPA2-TKIP connection that starts up and connects automatically when Ubuntu does.
Incidentally, I have followed the start up script that was posted in post #2 at the start of this thread.
Thanks again.
I'm totally new to linux other than accessing a web server through shell so I only know a little.
This ubuntu box has been built to act as a secured gateway ICS box.
Basically I have a wireless router downstairs which the ubuntu box (located upstairs) is supposed to connect to via a PCI wireless card.
This internet conenction should then go to the ubuntu box's on board ethernet and then from there to a wired router to disperse the internet to any computer connected to that router.
I wanted to use ubuntu as a secured gateway and file server and chose linux rather than windows due to linux being more secure.
I repair and maintain PC's and any I need to connect to the internet, I wanted to do it as securely as possible to protect any sensitive data that may or may not be on those machines.
Last edited by PCDoc; January 19th, 2009 at 07:47 PM.
Anyone???
I don't mean to stress but I could do with some help on this rather urgently.
Been at it a week and getting no where fast.
I'm open to any suggestions anyone might have that may help.
Thanks, Mike.
PCDoc,
Please try this (leave out the last line of your settings):
Then reboot and do a:auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid myssidhere
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk 8b79c14a1311970##############################
Please post the output message.sudo ifdown -v wlan0
sudo ifup -v wlan0
Have you also tried to use a static IP address? I have seen such DHCP issues before.
Many thanks for replying wieman01.
Ok, did as you suggested with the last line of the interfaces file.
I also assigned a static address, gateway, subnet etc as you suggested.
I rebooted.
At start up ubuntu slowed down about halfway in again and I could see DHCP Client by Internet Consortium then it issued DHCPRELEASE and dropped the static IP I gave it in interfaces file.
It then began to DHCPDISCOVER again looking at 255.255.255.255 on port 67,
Found nothing and went sleep.
Ubuntu booted up and I Checked and there was no internet connection so I issued the commands you told me to.
Here are the results:
sudo ifdown -v wlan0
Code:Configuring interface wlan0=wlan0 (inet) run-parts --verbose /etc/network/if-down.d run-parts: executing /etc/network/if-down.d/avahi-autoipd run-parts: executing /etc/network/if-down.d/wpasupplicant dhclient3 -r -pf /var/run/dhclient.wlan0.pid -lf /var/lib/dhcp3/dhclient.wlan0.leases wlan0 There is already a pid file /var/run/dhclient.wlan0.pid with pid 4568 killed old client process, removed PID file 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/ wmaster0: unknown hardware address type 801 wmaster0: unknown hardware address type 801 Listening on LPF/wlan0/00:a1:b0:90:0b:b9 Sending on LPF/wlan0/00:a1:b0:90:0b:b9 Sending on Socket/fallback DHCPRELEASE on wlan0 to 192.168.123.1 port 67 ifconfig wlan0 down run-parts --verbose /etc/network/if-post-down.d run-parts: executing /etc/network/if-post-down.d/avahi-daemon run-parts: executing /etc/network/if-post-down.d/wireless-tools run-parts: executing /etc/network/if-post-down.d/wpasupplicant wpa_supplicant: terminating wpa_supplicant daemon via pidfile /var/run/wpa_supplicant.wlan0.pid Stopped /sbin/wpa_supplicant (pid 4533). wpa_supplicant: removing /lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid
sudo ifup -v wlan0
Code:Configuring interface wlan0=wlan0 (inet) run-parts --verbose /etc/network/if-pre-up.d run-parts: executing /etc/network/if-pre-up.d/wireless-tools run-parts: executing /etc/network/if-pre-up.d/wpasupplicant wpa_supplicant: wpa-driver wext wpa_supplicant: /sbin/wpa_supplicant -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -D wext -q -f /var/log/wpa_supplicant.wlan0.log -C /var/run/wpa_supplicant Starting /sbin/wpa_supplicant... wpa_supplicant: creating sendsigs omission pidfile: /lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid wpa_supplicant: ctrl_interface socket located at /var/run/wpa_supplicant/wlan0 wpa_supplicant: wpa-ap-scan 1 -- OK wpa_supplicant: configuring network block -- 0 wpa_supplicant: wpa-ssid "IcArUsNeT" -- OK wpa_supplicant: wpa-psk ***** -- OK wpa_supplicant: wpa-pairwise CCMP -- OK wpa_supplicant: wpa-group CCMP -- OK wpa_supplicant: wpa-key-mgmt WPA-PSK -- OK wpa_supplicant: wpa-proto RSN -- OK wpa_supplicant: enabling network block 0 -- OK dhclient3 -e IF_METRIC=100 -pf /var/run/dhclient.wlan0.pid -lf /var/lib/dhcp3/dhclient.wlan0.leases wlan0 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/ wmaster0: unknown hardware address type 801 wmaster0: unknown hardware address type 801 Listening on LPF/wlan0/00:a1:b0:90:0b:b9 Sending on LPF/wlan0/00:a1:b0:90:0b:b9 Sending on Socket/fallback DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4 No DHCPOFFERS received. No working leases in persistent database - sleeping. run-parts --verbose /etc/network/if-up.d run-parts: executing /etc/network/if-up.d/avahi-autoipd run-parts: executing /etc/network/if-up.d/avahi-daemon run-parts: executing /etc/network/if-up.d/mountnfs run-parts: executing /etc/network/if-up.d/ntpdate run-parts: executing /etc/network/if-up.d/wpasupplicant
So still no internet, so I again I ran
which told me another instance of wpa_supplicant was running.Code:sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
I terminated the process ID and ran that command again which game me this:Code:ctrl_iface exists and seems to be in use - cannot override it Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore Failed to initialize control interface '/var/run/wpa_supplicant'. You may have another wpa_supplicant process already running or the file was left by an unclean termination of wpa_supplicant in which case you will need to manually remove this file before starting wpa_supplicant again.
And the internet connected.Code:CTRL-EVENT-SCAN-RESULTS CTRL-EVENT-SCAN-RESULTS CTRL-EVENT-SCAN-RESULTS CTRL-EVENT-SCAN-RESULTS CTRL-EVENT-SCAN-RESULTS CTRL-EVENT-SCAN-RESULTS Trying to associate with 00:06:4f:61:2b:22 (SSID='IcArUsNeT' freq=2412 MHz) Associated with 00:06:4f:61:2b:22 WPA: Key negotiation completed with 00:06:4f:61:2b:22 [PTK=TKIP GTK=TKIP] CTRL-EVENT-CONNECTED - Connection to 00:06:4f:61:2b:22 completed (auth) [id=0 id_str=] WPA: Group rekeying completed with 00:06:4f:61:2b:22 [GTK=TKIP]
But it's not after rebooting.
Also fter rebooting I removed the SH start up script that was mentioned in post #2 of this thread and now it no longer does the DHCPRELEASE and DHCDISCOVER thing at boot up which I thought was interfering (I may be wrong and can easily put it back).
However, I can't get internet anymore.
I tried terminating the PID of the already running wpa_supplicant and running the wpa_suplicant command above and I get nothing.
It just repeats CTRL-EVENT-SCAN-RESULTS in the terminal window.
Now I'm really confoooosed.
I hope I have provided all the info and more that you requested.
I have tried to be detailed and methodical to help you to help me.
Many many thanks Mike.
Last edited by PCDoc; January 21st, 2009 at 12:28 AM.
You should not have to run:
...if you configure WPA using the "interface" configuration file. Either one is enough.sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
Could you post the contents of "interfaces" after enabling it to use a static IP address? It's still trying to get an address via DHCP and that is odd.
Hi again weimoan01,
Sorry I haven't replied sooner, but I've not been around and so haven't been working on the server.
Please find a copy and paste of my interfaces file:
This is exactly as it sits.Code:auto lo iface lo inet loopback auto wlan0 iface wlan0 inet dhcp address 192.168.123.40 gateway 192.168.123.1 dns-nameservers 192.168.123.1 netmask 255.255.255.0 wpa-driver wext wpa-ssid IcArUsNeT wpa-ap-scan 1 wpa-proto RSN wpa-pairwise CCMP wpa-group CCMP wpa-key-mgmt WPA-PSK wpa-psk 8b79c14a1311970a6fec1578326753b80f62c885dd8b5c5c227148d81c73f8c8
As previously mentioned, my SSID was hidden, but I set it to broadcast while getting this working.
Ideally, if we get this resolved, I'd like it to go back to being hidden if possible.
Thanks again, your continued support is extremely valued!
Mike.
Thank you! thread number 50 solved my problem...now i get wireless connection after boot-up.
Cheers
PCDoc,
Try this instead and post back please:
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 192.168.123.40
gateway 192.168.123.1
dns-nameservers 192.168.123.1
netmask 255.255.255.0
wpa-driver wext
wpa-ssid IcArUsNeT
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk 8b79c14a1311970a6fec1578326753b80f62c885dd8b5c5c22 7148d81c73f8c8
Wow, I can't beleive I missed that..
Still set to DHCP instead of static.. My brain must be fried lol.
I changed it to static, but still the same.
No internet.
Bookmarks