Ken Smith on 26 Feb 2016 12:50:19 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Public Wifi


Thanks for the responses. I am running OpenSuse 13.2 kde and yes I am using Networkmanager.
Captive portal seems to be the issue. 
I looked for any dns-clean service or scripts and found none.
Some of the opensuse forums recommend 'service nscd restart' to clear dns cache.
Will get to see if it works tonight, would really like find a config file to stop this behavior or script it.
Now I am curious though so down the rabbit hole.

Looking for network services:
systemctl -t service

nscd.service
NetworkManager.service
wpa_supplicant.service
ModemManager.service

RTFM:
man NetworkManager
No options here to clear DNS cache, also no config file options to clear DNS cache (unless I am missing something)

RTFM:
man nscd
caches most common service requests, blah blah blah
databases for passwd, group and host
interesting read under NOTES:
nscd looks for changes in config files and flush's cache when changed, this does not cover
non-standard NSS config files specified in /etc/nsswitch.config

cat /etc/nsswitch.config == see that hosts and networks uses dns
Now changing this config file would affect all hosts and networks so this isn't what I am aiming for, is it?

RTFM:
man wpa_supplicant
cat /etc/wpa_supplicant/wpa_supplicant.conf == nothing much here
man wpa_supplicant.conf == really customizable not sure what I can do with this tbh, moving on
man wpa_cli == argument -a "file" seems interesting, try to use some commands in interactive mode
sudo wpa_cli == "error could not connect to wpa_supplicant" == mother !#$@#&

A.D.H.D kicks in full blast, just write a script.
nmcli networking off
service nscd restart
nmcli networking on

Found nmcli a bit late in the game, really wish I found it earlier, seems like I might be able to do something 
with. 

Sorry for the long write up, been going on over a couple days so it kinda built up.
Was I at least heading in the right direction?



On Wed, Feb 24, 2016 at 9:42 PM, <ksbhaskar@gmail.com> wrote:
‎On Ubuntu something like sudo service dns-clean restart / sudo systemctl restart dns-clean.service should do it.

Sent from my phone
  Original Message  
From: Keith C. Perry
Sent: Thursday, February 25, 2016 8:00 AM
To: Philadelphia Linux User's Group Discussion List
Reply To: Philadelphia Linux User's Group Discussion List
Subject: Re: [PLUG] Public Wifi

Josh said everything I was going to say.

Running dhcpcd or dhclient again should have overwrote the resolv.conf.

---
KP-

On Feb 24, 2016 21:21, Josh Zenker <jzenker@gmail.com> wrote:
>
> I think the DNS change is probably your answer. Network admins often implement captive portals like the one you're describing by poisoning DNS to return the captive portal IP for all forward lookups. If you were previously accepting whatever DNS servers were offered by the DHCP server, this explanation fits.
>
> I'm unsure why restoring your backup of the config didn't help though. If you're using something like NetworkManager to manage your connections, you might be able to force it to generate a fresh config.
>
> On Wednesday, February 24, 2016, Ken Smith <ruttsmith@gmail.com> wrote:
>>
>> Hey I was wondering if anybody ever had any problems with a login page for public wifi not loading on linux?
>> I am having this issue at school and at the library. 
>> Each of the wifi's redirect you to a login page when connecting. The first time I connected to these wifi's
>> I was redirected and the connection worked fine, but ever since then I wont be redirected to the login page.
>> The only thing that I changed recently was my resolv.conf file to change DNS servers to google from comcast.
>> I tried changing back to the backup of the original resolv.conf but same issue. Tried some googling but havent
>> found anything yet. My android is not having any issue with the connection or the redirect. Any ideas?
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug