What's new

Don't show warning page when page was blocked?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

V@no

Occasional Visitor
Hello.

When a page was blocked by parental controls, it shows a warning webpage explaining what happened, providing WAY TOO MUCH information...
How to prevent this from showing?

1690124508762.png

I just want certain websites be unreachable, period.

Thank you.
 
You can't.
 
@RMerlin , would skynet do this?
Skynet simply compares and blocks IPs that are present in the IP table rules... it doesn't seem to care who or what is doing it, and isn't keep track of any particular session in order to redirect people to a blocking page.
 
I'd guess that you could probably create your own version of /www/blocking.asp and overmount the original when the router boots up.
That sound easy, but how would I mount it? I've tried edit it derectly, but failed due to read-only file system
 
That sound easy, but how would I mount it? I've tried edit it derectly, but failed due to read-only file system
Take a copy of that file, edit it, and save it to somewhere in jffs, e.g. /jffs/scripts/blocking.asp.

Then put an appropriate mount command in services-start, e.g.
Code:
mount -o bind /jffs/scripts/blocking.asp /www/blocking.asp

P.S. I haven't tested this so YMMV.
 
Last edited:
Thank you, this is working, not ideal because it still shows different address in the url bar, but at least the message can be modified/removed.

Even though it's .asp file, I gather it's not ASP language used in Miscrosoft IIS, but does it allow modify/send http headers too?
 
You can't.
Actually you can. Go to Administration - System, then Enable Access Restrictions, fill in the IP addresses that are allowed to access the router, any IP addresses outside the whitelist will be blocked, so they will not enter the blocked page.
 
Actually you can. Go to Administration - System, then Enable Access Restrictions, fill in the IP addresses that are allowed to access the router, any IP addresses outside the whitelist will be blocked, so they will not enter the blocked page.
Isn't that setting only relevant for WAN access?
 
So far I ended up using this as `blocking.asp`:

HTML:
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address><script>
const address = <% bwdpi_redirect_info(); %>;
document.write(address&&address[1]||'<% get_parameter("domain"); %>');
//history.go(-1); //redirect to previous page
</script></address>
</body>

@RMerlin
This whole page redirection routine doesn't work on https sites with error `ERR_SSL_PROTOCOL_ERROR`
 
This whole page redirection routine doesn't work on https sites with error `ERR_SSL_PROTOCOL_ERROR`
I know. Nothing I can do about.
 
Can the redirection be done via http headers instead of html?
The redirection requires a connection to the httpd daemon, which will always be the same protocol (http or https) as the original request. Only after that connection is the router able to apply the redirection (301). Therefore, you will always end up with the protocol error issue.
 
Sounds like the way URL Block in firewall works is a better alternative than this redirection...;)
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top