Date: Wed, 3 Aug 2016 06:41:32 +0800 From: Ben Woods <woodsb02@gmail.com> To: "mexas@bris.ac.uk" <mexas@bris.ac.uk> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: wireless hints: AP, username, password - does not work Message-ID: <CAOc73CBk4LX42q5xFjaKax_jFsYHbeni%2BA0YaJTB-PBFN12arg@mail.gmail.com> In-Reply-To: <201608022211.u72MBIxR079329@mech-as222.men.bris.ac.uk> References: <201608022211.u72MBIxR079329@mech-as222.men.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, 3 August 2016, Anton Shterenlikht <mexas@bris.ac.uk <javascript:_e(%7B%7D,'cvml','mexas@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. https://en.m.wikipedia.org/wiki/Captive_portal 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): wlans_ath0="wlan0" ifconfig_wlan0="ssid *your_ssid_here* DHCP" Run: # 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! -Ben -- -- From: Benjamin Woods woodsb02@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOc73CBk4LX42q5xFjaKax_jFsYHbeni%2BA0YaJTB-PBFN12arg>