Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I must say I am really new to the networking stuff and Linux (Ubuntu 8.10). I am unable to connect to my wireless network after running these commands to change the MAC address and run in monitor mode:

airmon-ng stop wlan0 
ifconfig wlan0 down
macchanger --mac 00:11:22:33:44:55 wlan0
airmon-ng start wlan0 

The reason I did this is because I want to test how secure my wireless network is (first stopping and trying to change the MAC, and then using air-crack-ng).

Here is what I have tried to reconnect to my wireless network:

  1. Firstly I think I should change wlan0 to where it was (especially the Mac address) with the following commands:

    ifconfig mon0 down
    ifconfig wlan0 down
    macchanger --mac 00:0e:9b:ab:56:19 # myoriginalMacAddress
    airmon-ng stop wlan0
    ifconfig wlan0 up
    
  2. Secondly I tried to connect to my wireless network in my WICD but it failed at obtaining IP address after going through validating authentication. So I exited WICD and tried to do the same thing in terminal:

    $ sudo iwconfig wlan0 essid "mywireless"
    $ sudo dhclient wlan0
    There is already a pid file /var/run/dhclient.pid with pid 23682
    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/
    
    mon0: unknown hardware address type 803
    wmaster0: unknown hardware address type 801
    mon0: unknown hardware address type 803
    wmaster0: unknown hardware address type 801
    Listening on LPF/wlan0/00:0e:9b:ab:56:19
    Sending on   LPF/wlan0/00:0e:9b:ab:56:19
    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 12
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 1
    No DHCPOFFERS received.
    No working leases in persistent database - sleeping.
    

Here is the ifconfig output of my network adapters if it can help:

$ ifconfig

eth0      Link encap:Ethernet  HWaddr 00:c0:9f:8d:23:74  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:19 Base address:0x1800 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4457 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4457 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:493002 (493.0 KB)  TX bytes:493002 (493.0 KB)

wlan0     Link encap:Ethernet  HWaddr 00:0e:9b:ab:56:19  
          UP BROADCAST NOTRAILERS PROMISC ALLMULTI  MTU:576  Metric:1
          RX packets:1508929 errors:0 dropped:0 overruns:0 frame:0
          TX packets:768144 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:806027375 (806.0 MB)  TX bytes:78834873 (78.8 MB)

wlan0:avahi Link encap:Ethernet  HWaddr 00:0e:9b:ab:56:19  
          inet addr:169.254.5.92  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST NOTRAILERS PROMISC ALLMULTI  MTU:576  Metric:1

wmaster0  Link encap:UNSPEC  HWaddr 00-0E-9B-CD-4E-18-00-00-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Does anyone know what my problem is and how to solve it?

share|improve this question

migrated from stackoverflow.com Sep 20 '09 at 13:59

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

What version of Linux/Unix are you running, because not all commands are the same for wireless?

Command:

$ cat /etc/*-release

And why are you stopping and trying to spoof(change your MAC) before you connect to your wireless AP(access point)or wireless router, instead of just connecting to it?

This should only apply if you are planning to do some wireless pentest/auditing or to see how secure your wireless network router/ap is.

ifconfig mon0 down ifconfig wlan0 down macchanger --mac 00:0e:9b:ab:56:19 # myoriginalMacAddress airmon-ng stop wlan0 ifconfig wlan0 up

The reason you are having issues with you second command or (2) is cause of all the other unnecessary stuff you just did on number 1.

share|improve this answer
    
Thanks! I am using Ubuntu 8.10. Yes I want to test how secure my wireless network is (first stopping and trying to spoof(change your MAC), and then using air-crack-ng). Without the commands in (1), I cannot connect to my wireless network. So I think I should revert what I did with the Mac address and restart wlan0. That's my intention of (1). If (1) is wrong, could you please point out what is correct? –  Tim Sep 20 '09 at 15:52
add comment

Okay, you might want to try these guys from the Ubuntu Forums:

I highly recommend to start here if you want to learn about the commands and hardware (compatible wireless card)requirements for auditing a wireless network, based on your distro(distribution).

Registration is free and so is the help; in addition, to the fact that the help will be more specialized to your distro(distribution) as opposed to me or anyone here just giving your generic linux commands that might or might not work for your given distro.

Option one:

http://ubuntuforums.org/showthread.php?t=1015877

Option two: If you think you have the hardware verify below:

http://www.aircrack-ng.org/doku.php?id=compatibility%5Fdrivers

Once you have verified that you hardware(wireless card is indeed supported), we move to step three which is also optional.

Option three: Download

This:

http://www.securityfocus.com/archive/1/506235/30/0/threaded

OR

http://www.remote-exploit.org/backtrack%5Fdownload.html

It's a live CD, and it's the fastest and most secure way to audit you wireless network: It comes with Gerix-Wifi-Cracker; in addition, to Wepbuster another tool to easily crack varisous type of Wireless routers (WPA and WEP).

If you are brave enough and have a backup and are not scared of messing up your linux box, you can also just install these tools using apt-get or synaptic.

The only difference is that with the tools you rarely have to change your card from Managed mode to Monitor mode, and do all the typing, since the tools will do that for you.

However, if you install you will be at the command line, and probably spending some time at the Ubuntu Forums. In addition if you break something or mess something up, you are probably going to have to fix it, unlike windows, unless if you have a backup or the time to be tinkering with breaking stuff and fixing, linux like Unix is a big time hogger especially for a beginner.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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