Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: How to scan for and connect to a wireless network point from the command line

  1. #1
    Junior Member KingMidas's Avatar
    Join Date
    May 2008
    Location
    England
    Posts
    52

    Default How to scan for and connect to a wireless network point from the command line

    Thought i'd add a quick tutorial on how to connect to a network from the command line - apologies if this has already being covered - link it and i'll hang my head in shame- otherwise..


    wireless key - security key
    essid - network name
    ifconfig - Enables your wireless device
    iwlist - lists available access points
    iwconfig - configuring wireless connection
    dhclient - to get an ip address via DHCP

    step 1 - Enable wireless device.

    Enter the command:-

    ifconfig wlan0 up

    Where 'wlan0' is the name of your wireless device - if your not sure what yours is key 'iwconfig' at the command prompt


    step 2 - scan for networks

    iwlist wlan0 scan

    You will then be given a list of available networks in range


    step 3 - configure connection

    iwconfig wlan0 essid (network name) key (wireless key)

    eg

    iwconfig wlan0 o2wireless key 5405507cd1

    Note this is for a HEX key for ascii you have to add 's:' after 'key' as in..

    iwconfig wlan0 essid key s: wireless key


    Step 4 Request an ip address via DHCP

    dhclient wlan0

    You should now be connected and have an ip address

    If anyone can add more to this please feel free im learning and would appreciate some pointers to add to this
    My Blog
    http://hackingmidasgold.blogspot.com
    Some days i feel like King Midas in Reverse - everything i touch turns to sh*t...............

  2. #2
    Just burned his ISO
    Join Date
    Jun 2009
    Posts
    7

    Default

    i have tried everything and my ath0 card wont connect right dhclient times out

  3. #3
    Moderator KMDave's Avatar
    Join Date
    Jan 2010
    Posts
    2,281

    Default

    Quote Originally Posted by jake111234567 View Post
    i have tried everything and my ath0 card wont connect right dhclient times out
    Maybe you should tell us which commands you issued.
    Tiocfaidh ár lá

  4. #4
    Just burned his ISO
    Join Date
    Jun 2009
    Posts
    7

    Default

    i used
    Code:
     iwconfig ath0 essid (network name) key (wireless key)
    then
    Code:
     dhclient ath0
    dhclient times out thhen tries to find a adress then gives a random adress

  5. #5
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    If you essid has strange characters or spaces make sure you put it in quotes so the bash shell knows...
    example: iwconfig ath0 essid "F00-B4rZ m**p" key 29384729364

  6. #6
    Just burned his ISO
    Join Date
    Jun 2009
    Posts
    7

    Default

    Quote Originally Posted by pureh@te View Post
    If you essid has strange characters or spaces make sure you put it in quotes so the bash shell knows...
    example: iwconfig ath0 essid "F00-B4rZ m**p" key 29384729364
    my essid is just one word and its Brown
    i have tried
    Code:
     iwconfig ath0 essid <essid> key <key>
    dhcpcd ath0
    dhcpcd ouputs
    Code:
     root@bt:/# dhcpcd ath0
    err, ath0: timed out
    err, ath0: lease information file `/var/lib/dhcpcd/dhcpcd-ath0.info' does not exist
    warn, ath0: using IPV4LL address 169.254.167.44
    root@bt:/# dhcpcd.sh: interface ath0 has been configured with new IP=169.254.167.44

  7. #7
    Just burned his ISO
    Join Date
    Jun 2009
    Posts
    14

    Default

    I'm using the net at uni with my wireless card, that requires a username and password. How would i log on using Bactrack 4 beta, with my USB D-LINK DWA110 (RT73).

  8. #8
    Just burned his ISO
    Join Date
    Jun 2009
    Posts
    23

    Default

    Thx for this nice tutorial KingMidas!
    http://ne0matrix.blogspot.com
    http://ne0matrix.blip.tv

  9. #9
    Member inf_437's Avatar
    Join Date
    Feb 2010
    Posts
    57

    Default

    Quote Originally Posted by azn_crim View Post
    I'm using the net at uni with my wireless card, that requires a username and password. How would i log on using Bactrack 4 beta, with my USB D-LINK DWA110 (RT73).
    As far as I understand your question there are two options,

    1. your uni has a proxy in the Network to which you connect, this has nothing to do with connecting to the wireless network, only if you want to get on the internet you'll need to type in username and pw.

    2. You uni's wlan is secured with a certificate and connected to the AD (Active Directory) that's why you need username and pw. This is a little more complicated since you need to know which certificate you need to use and download it prior to the connection with the wireless network.


    Since your post has not that much information this is all I can give you to help so far.

  10. #10
    Just burned his ISO
    Join Date
    Jun 2009
    Posts
    14

    Default

    Quote Originally Posted by inf_437 View Post
    As far as I understand your question there are two options,

    1. your uni has a proxy in the Network to which you connect, this has nothing to do with connecting to the wireless network, only if you want to get on the internet you'll need to type in username and pw.

    2. You uni's wlan is secured with a certificate and connected to the AD (Active Directory) that's why you need username and pw. This is a little more complicated since you need to know which certificate you need to use and download it prior to the connection with the wireless network.


    Since your post has not that much information this is all I can give you to help so far.
    Just gathered more info. I understand there is a proxy server 1.1kingfisher.cdu.edu.au:3128 squid/2.5.STABLE14 (IP 138:80:0:10)
    There are open ports which i have tested to be ok.
    In terms of the certificate, does it helps that that i have set up the same laptop to their network but via Windows Vista and my 4965AGN Wireless card.
    - Info so far has been great. Thanks in advance.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •