wireless hints: AP, username, password - does not work

Ben Woods woodsb02 at gmail.com
Tue Aug 2 22:41:34 UTC 2016

On Wednesday, 3 August 2016, Anton Shterenlikht <mexas at bris.ac.uk
<javascript:_e(%7B%7D,'cvml','mexas at bris.ac.uk');>> wrote:

> I need to use my FreeBSD 11-current laptop
> in a new environment where all I'm given is
> the access point (AP) name, the username and the password.
> The local help is not great.
> I'm told my browser should "automatically" point me
> to a page where I enter the username and the password.
> For starters I'm not familiar with username/password
> for wireless authentication.
> My /etc/wpa_supplicant.conf* files either
> point to a cert file, and use identity/password,
> or are just:
> network={
>         ssid="..."
>         psk="..."
> }
> How can this work with a username/password pair?
> When I use ifconfig_wlan0="DHCP WPA" I cannot connect.
> If I use just ifconfig_wlan0="DHCP" I can connect to the AP,
> and get the ip address, but cannot connect anywhere else.
> I guess they are using some weird MS only setup?
> Anything else I can try to get connected?
> Thanks
> Anton

Hi Anton,

This sounds like it may be an open (unsecured) wifi, with adaptive portal
to redirect your initial web traffic to a web page requesting a username
and password.

This is often used in airports / large coffee retail chains and is most
easily recognisable by the way it is presented in many mobile phones. When
they scan for wifi networks, there is one available to connect to which
does not have a padlock next to it. Once they connect to the wifi, they
will be associated to the AP and have an IP address, but network traffic
initially doesn't work. Shortly after connecting, many phones automatically
pop-up a website prompting for the username and password to enter.

On FreeBSD, it is as you said. Assuming you have atheros, put the following
in your /etc/rc.conf (replacing your_ssid_here with the wifi SSID):

ifconfig_wlan0="ssid *your_ssid_here* DHCP"

# service netif restart

Once you are connected and have an IP address, open your browser and
navigate to any webpage which DOESNT USE HTTPS. I commonly use
www.distrowatch.com, but any others you know which don't use https will
work. This is the part that tricks many people, as the captive portal will
redirect all web traffic to the portal until authenticated, but https
traffic will detect the server is not who they are supposed to be and fail.

Once authenticated, you should get a connection. Note that if can be easier
to connect with a mobile phone to confirm how it should work, and what the
SSID is etc, and then replicate on your FreeBSD laptop.

Good luck!


From: Benjamin Woods
woodsb02 at gmail.com

More information about the freebsd-questions mailing list