captive-portal | simple captive portal that uses iptables | Firewall library

 by   nikosft Python Version: Current License: Apache-2.0

kandi X-RAY | captive-portal Summary

kandi X-RAY | captive-portal Summary

captive-portal is a Python library typically used in Security, Firewall applications. captive-portal has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However captive-portal build file is not available. You can download it from GitHub.

This is a very simple cpative portal that uses IPTABLES and python's BaseHTTPServer. When it is executed it blocks all traffic except DNS and redirects all HTTP traffic to a login page. When a user enters the correct credentials a new IPTABLES entry is added and all the traffic originating from the IP address of that user is allowed.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              captive-portal has a low active ecosystem.
              It has 35 star(s) with 28 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 0 have been closed. On average issues are closed in 208 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of captive-portal is current.

            kandi-Quality Quality

              captive-portal has 0 bugs and 15 code smells.

            kandi-Security Security

              captive-portal has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              captive-portal code analysis shows 0 unresolved vulnerabilities.
              There are 1 security hotspots that need review.

            kandi-License License

              captive-portal is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              captive-portal releases are not available. You will need to build from source code and install.
              captive-portal has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              captive-portal saves you 34 person hours of effort in developing the same functionality from scratch.
              It has 92 lines of code, 2 functions and 1 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed captive-portal and discovered the below as its top functions. This is intended to give you an instant insight into captive-portal implemented functionality, and help decide if they suit your requirements.
            • Handle POST request .
            • Handle GET request .
            Get all kandi verified functions for this library.

            captive-portal Key Features

            No Key Features are available at this moment for captive-portal.

            captive-portal Examples and Code Snippets

            No Code Snippets are available at this moment for captive-portal.

            Community Discussions

            QUESTION

            Is there a way to implement captive portal on windows hotspot?
            Asked 2020-Mar-13 at 07:44

            I am looking for a way to implement a captive portal for the windows 10 - mobile hotspot. The idea is to redirect all devices that connect to the hotspot to a webpage.

            I was able to find this article which shows how to do it in linux.

            But I have been unsuccessful in finding a similar one for windows. Posts like this one proved to be dead ends.

            I am okay with using a simple nginx server to give 302 redirect response to clients if needed, but prefer not to use any existing software that implements a captive portal.

            UPDATE

            I have succeeded in triggering a captive portal on clients (linux laptop, android device etc) using a workaround.

            Whenever a device connects to the hotspot it sends a request to some predefined websites to check if the wifi connection has internet access. If it gets a 302 response it generates the captive portal window.

            So I added the following entries to the hosts file on windows machine.

            ...

            ANSWER

            Answered 2020-Mar-13 at 07:43

            The setup I mentioned in the UPDATE above was tweaked finally to get where I wanted. I used dnschef, an open-source dns server that works perfectly as a command line client. The steps followed.

            1. Start windows mobile hotspot.

            2. Go to Network adapters => Select hotspot adapter => Change IPv4 settings => set 127.0.0.1 as DNS server.

            3. Start dnschef with --fakeip = 192.168.137.1
            4. Start an http server on 192.168.137.1 and give 302 redirect response to all requests.

            And that's it! Whenever a device connects to the hotspot, it will attempt to connect to any one of the preset websites used to determine internet connectivity. These requests will be resolved locally by dnschef to our Nginx server. The Nginx server then gives a 302 redirect which triggers captive portal on the client.

            Source https://stackoverflow.com/questions/59926169

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install captive-portal

            You can download it from GitHub.
            You can use captive-portal like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/nikosft/captive-portal.git

          • CLI

            gh repo clone nikosft/captive-portal

          • sshUrl

            git@github.com:nikosft/captive-portal.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Firewall Libraries

            opensnitch

            by evilsocket

            fail2ban

            by fail2ban

            TheFatRat

            by screetsec

            TheFatRat

            by Screetsec

            ModSecurity

            by SpiderLabs

            Try Top Libraries by nikosft

            libcoap

            by nikosftC

            IB-PRE

            by nikosftPython

            CoAP-examples

            by nikosftJava

            IB-PRE-APP

            by nikosftPython

            Cal-lite

            by nikosftJava