Looking for an open source captive portal solution that serves up a payment screen for internet access. reddit / selfhosted ---------------------------------------------------------------------- FiIthy_Anarchist · 2023-10-19 23:22 There's gotta be something out there, maybe my google Fu is lacking. Apartment building was just thrown up across the way from me. Looking to hoover up a few quick bucks from new tenants as they wait for isp visits. ---------------------------------------------------------------------- Firestarter321 · 2023-10-20 00:54 I doubt you’ll find anything as taking payments just isn’t something that’s going to happen with a free app as there’s just too much liability. I could be wrong though. ---------------------------------------------------------------------- ElevenNotes · 2023-10-20 03:53 Unifi, built in payments via paypal and more. ---------------------------------------------------------------------- fmillion · 2023-10-20 04:50 Doubt liability is the issue. Plenty of free apps allow integration with payment processing for whatever reason you want. It's either that it's seen as an enterprise feature that has little application outside of a corporate/university/hotel/etc. network, or nobody's bothered to do it. The idea is pretty straightforward. Here's the theory of what you would need - maybe someone can design it... * A service that dynamically creates/removes firewall rules. iptables is plenty powerful enough - you can just filter on MAC address, and you can use NAT to direct all unknown MAC address DNS queries to a custom configged dnsmasq that responds with the captive portal IP for all hosts, and has a very short TTL so once the user has paid and the new rule is in place they'll very quickly start getting the correct IPs for things. * Ideally a user account system (e.g. a user can pay for one hour, two hours, etc). Random MAC address privacy controls on many mobile devices could cause issues if you statically assign payments to MAC addresses. * The web app itself, that communicates with the service. It could be as simple as updating records in a database, where the service reads the same database to do its job. * Integration with a payment processor of your choice (and exceptions in your custom dnsmasq so the user can actually reach the payment processor to login/pay) This same idea could even extend to non-payment scenarios. For example, if you want to limit your kid's time per day/week/etc. on the Internet, or limit how much time guests can use the Internet... You could even do tiers - a cheap/free Tier 1 only gives access to ports 80 and 443 and an in-house DNS server, but if you want all ports access (e.g. for VPNs or using cloudflare DNS) you need Tier 2, and then you could add in tc traffic shaping to limit bandwidth by tier... I have to admit I'm resisting an itch to try implementing it for fun... ---------------------------------------------------------------------- TBT_TBT · 2023-10-20 08:33 You won’t find one, because these solutions need to interact with the networking hardware. I would indeed suggest UniFi as well, because they have great, affordable, controller managed access points and switches. Normally, that only is a feature of multiple times as expensive enterprise gear.