Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to connect to an OPEN wifi from a terminal.

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

How to connect to an OPEN wifi from a terminal.

#1 Post by edbarx »

IFUP fails to connect to an OPEN wifi even when the proper ESSID has been entered in /etc/network/interfaces file. The following method is a way of connecting to an OPEN wifi using iwconfig.

The Procedure:
  1. First bring up the network interface wlan0 or whatever you have.

    Code: Select all

    #ifconfig wlan0 up
  2. Assuming your wifi hotspot name, ESSID, is freeopenwifi, run:

    Code: Select all

    # iwconfig wlan0 essid freeopenwifi
  3. Run dhclient to assign an ip address so that the connection becomes useable.

    Code: Select all

    # dhclient wlan0
Enjoy. :D
Last edited by edbarx on 2016-12-08 19:39, edited 1 time in total.
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

Re: How to connect to an OPEN wifi from a terminal.

#2 Post by edbarx »

If someone knows how to disconnect other than brute forcing a disconnection like killing dhclient and using iwconfig wlan0 down, please post your method here. Sometimes, the only way to connect is by using these low level methods.
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: How to connect to an OPEN wifi from a terminal.

#3 Post by Head_on_a_Stick »

Clear the DHCP lease with:

Code: Select all

# dhclient -r wlan0
Then either bring the connection down:

Code: Select all

# ifconfig wlan0 down
Or force a null connection:

Code: Select all

# iwconfig wlan0 ap 00:00:00:00:00:00
EDIT: thanks for the great guide, it is very useful :)
deadbang

User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

Re: How to connect to an OPEN wifi from a terminal.

#4 Post by edbarx »

To Head-on-a-Stick: Thanks.
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

Post Reply