Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captive Portal functionality #17

Closed
krebbi opened this issue Aug 14, 2018 · 21 comments
Closed

Captive Portal functionality #17

krebbi opened this issue Aug 14, 2018 · 21 comments

Comments

@krebbi
Copy link

krebbi commented Aug 14, 2018

How difficult would it be to integrate a real captive portal functionality to this package like descriped here?

https://en.wikipedia.org/wiki/Captive_portal#Implementation

@davesteele
Copy link
Owner

I'm not sure what you are asking. If you want to implement a captive portal on the Pi, that's not a Comitup question. Once the outbound connection is made, the comitup web interface is taken down, and replaced with web_service, if defined. Just point that to a captive portal implementation (which I imaging exists somewhere).

If you want to automatically bypass a captive portal, it would be hard to make a general solution for that.

@krebbi
Copy link
Author

krebbi commented Aug 14, 2018

When connecting with a device to the running comitup, it would be nice to get the webpage from comitup without the need to open the browser and go to 10.41.0.1
to have it a bit more userfriendly. ;-)

@davesteele
Copy link
Owner

Ah. It would be fairly easy to do a redirect for http traffic. For https, it's not really practical, unless your device (e.g. cell phone) has some special logic for it already. It would be interesting to try.

@krebbi
Copy link
Author

krebbi commented Aug 15, 2018

@cyberchucktx
Copy link

Well, not really. adding all this to the comitup system would be (IMHO) unecessarily complex. I do agree that a reformatting of the basic WiFi page can be done rather easily (first).

davesteele added a commit that referenced this issue Aug 16, 2018
davesteele added a commit that referenced this issue Aug 16, 2018
davesteele added a commit that referenced this issue Aug 16, 2018
davesteele added a commit that referenced this issue Aug 16, 2018
@krebbi
Copy link
Author

krebbi commented Aug 25, 2018

Haven't had the chance to test this as I'm on vacation this and the next week. But I'm looking forward giving it a try a soon as I'm back at my Pi.

@davesteele
Copy link
Owner

The captive-portal branch has a web page that comes up correctly, but doesn't yet totally work with Android or IOS. I'm not getting the config parameters from Android for some reason, and IOS needs the ICMP *-unreachable ICMP filters added back into iptmgr. Let me know if you have any luck with that.

@krebbi
Copy link
Author

krebbi commented Aug 28, 2018

I'm still 6 days away from being back at my desk, but I just found this while researching the topic:

https://tools.ietf.org/html/rfc7710

Hopefully it will assist you.

@davesteele
Copy link
Owner

davesteele commented Aug 28, 2018 via email

@krebbi
Copy link
Author

krebbi commented Sep 4, 2018

Okay, I figured out that there are several issues. Primary at my iOS Device the Captive Portal Page doesn't show up automatically after connecting to the comitup-XXXX Hotspot.
But it show when trying to reach any website. Trying to visit google.com brings up the Comitpu-Website. But the URL in the addressbar is still "google.com".
Then choosing the WiFi and entering the key works like expected.

But there is a little mess in all of the python files regarding the version. Some files need 2.7 and others 3.
When having the wrong default version set up, it doesn't work. the networkmanager doesn't work properly. and setting things up via comitup-cli doesn't work either.

So I would suggest you'll try to get all files and dependencies to one version (best 3.5).

I'll go thtough the ieft-paper and check if I can adapt that into comitup.

@davesteele
Copy link
Owner

On IOS, I'm seeing the behavior I saw before blocking outbound ICMP unreachables - the AP connection is dropped after a couple of seconds (6ce7c1c).

Where are you seeing a python 2.7 requirement? I had an obsolete dependency on the configparser deb, but I don't see anywhere 2.7 being called out.

@krebbi
Copy link
Author

krebbi commented Sep 5, 2018

Hmm.. strange..

Just wrote a new B+ SD-Card and started over.
After cloning the repo and runninig python3 setup.py install I get:

dnslib is missing (solved with sudo pip3 install dnslib)
networkmanager is missing (sudo pip3 install python-networkmanager)
the name org.freedesktop.networkmanager was not provided by any .service files (sudo apt-get install network-manager)

And now I'm ending up with
"dbus.exceptions.DBus.Exception: org.freedesktop.systemd1.NoSuchUnit: Unit comitup-web.service not found."

Any idea what went wrong?

@davesteele
Copy link
Owner

The dnslib requirement is new with the captive portal. I think I made a local copy to deal with a missing deb. I'm not near the code right now.

For the rest, I use deb installs. Look at the dependencies in the debian/control file in the debian branch. That is also where systemd service files are set up. You can work around this by installing an old comitup deb, then deploying new code by copying to /usr/share/comitup. Or shortcut by starting with the Comitup image.

@davesteele
Copy link
Owner

dnslib should be this one.

@krebbi
Copy link
Author

krebbi commented Sep 5, 2018

okay, its getting worse and worse.. nothing works anymore. exceptions over exceptions.

next SD card....

@cyberchucktx
Copy link

cyberchucktx commented Sep 5, 2018 via email

@davesteele
Copy link
Owner

The more the merrier. I'll see about ensuring the repo is matched to my latest by Friday EOB a the latest.

@davesteele
Copy link
Owner

Trivial change pushed. I'll be packaging dnslib separately for stretch installs. Pip on the Pi for now.

davesteele added a commit that referenced this issue Dec 31, 2018
davesteele added a commit that referenced this issue Dec 31, 2018
davesteele added a commit that referenced this issue Dec 31, 2018
davesteele added a commit that referenced this issue Mar 4, 2019
@davesteele
Copy link
Owner

Captive portal implementation is in master.

@krebbi
Copy link
Author

krebbi commented Mar 21, 2019

Is it available over your PPA repository already?

@davesteele
Copy link
Owner

No, it is not ready for prime time yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants