Parental Control - Display custom webpage when internet is blocked

Hello,
This is my first post on this forum but I have been using OpenWRT for 4 years now. Before that, I was using dd-wrt for a few years.

I'm trying to understand the best way to have a custom webpage that displays something along the lines of 'You don't have access to the internet because it's your homework time' when internet is blocked for my kids.

Currently, all they get is the standard 'webpage failed to load' from their browser.

My assumption is that I would have to setup a webserver separately and display a standard HTML page when traffic is blocked.

Has anyone done this? Any thoughts on how I could go about implementing this?

It can't be done for https connections and those are now 90% of all connections.

Disclaimer: if you install fake certificates on your kids devices it could be done but it's quite complicated and a huge security risk.

2 Likes

Most similar think to what you need is a "captive portal".

1 Like

Not easily, put it can…

AdGuard has a project of mitm proxy which use the same rules than their android blocker… and could be expanded !

I have build it and I am already testing it…
It need to add a certificate on each client, and force clients to browse by proxy.
But it works

It is still a work in progress to be included in the main AdGuardHome ;

I thought of going the route of adding a self-signed cert and forcing all my traffic through a proxy.

I agree with @dlakelan . Not only is it too much work, but its also a security risk.

I like the idea of the captive portal by @eduperez but I think its overkill for my small home network of 10-15 devices.

Any other solutions are appreciated.

For now, I think the my blanket refusal to allow internet access during homework time should hopefully suffice!