How to setup a simple local user/pass web page for internet access?

Hello! I am trying to setup a web page on a local web server to redirect all traffic from a single MAC address. The ultimate goal here is to restrict internet access, except for a few sites, but allowing those with a specific user/pass to have full access from the same device. Basically this is a kids tablet and they only need access to Netflix but I would like to have full access when I am using it.

What I am thinking is when you try to use the web browser, like say google.com, you get redirected to a page requiring a username and password in order to access the site. Entering in the correct info grants you full access to the internet. I also want the access to expire when internet traffic from that device stops or is idle so that when it is used again to have to login again.

Before anyone suggests, I have considered creating a separate wifi profile but I would have to manually disconnect from and forget the network every time I am done using it.

I have mostly figured out how to redirect all traffic from a specific MAC. But, I don't really know where to start on the web page or how to have the access expire when traffic is idle. Also, which web server would be best for this? uhttpd, lighttpd? maybe a different web server? I have been researching this for the better part of two weeks and scouring the forums here and openwrt, but haven't found a clear answer. If someone could point me in the right direction or give me a few tips that would awesome! Thanks in advance!

Router: Linksys WRT1200AC
Firmware: LEDE 17.01.1

Edit: title was misleading

Does this help to get you started?
https://wiki.openwrt.org/doc/howto/wireless.overview#captive_portal_software_available_in_the_openwrt_repository

EDIT:
New URL: https://openwrt.org/docs/guide-user/services/captive-portal/start

The old page is for archival purposes only and does not receive updates any more.

1 Like

My friend you are a super helpful genius! I'll have to play around with it, but I think this is exactly what I am looking for. Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.