How to block certain page

dummy question.

How could I block certain page/domain ?

I have installed adblock package, and I thought thing like this could work

But it doesn’t :fearful:

Are there some other ways ?

Tried this in the DNS settings ?

1 Like

adblock kind of works (including wildcard domains), as long as the clients obey their given DNS settings.

1 Like

OpenNDS mitigates this problem by blocking all DNS services except its own (via dhcp).
The OpenNDS fqdn blocklists and walled garden are then also enforced.
If a client has another dns setup, all Internet access will be denied...

Are you talking about a specific page? (like the message thread title says?)
or about domain?
They are not the same thing.

Whole domain or a single hostname can be handled via adblock packages that adjust the DNS (Domain Name Service).

Several adblock packages exist for OpenWrt, and most of them also support DNS hijack / force / local enforcement config for firewall (whatever term is used by each specific adblock variant), so that the clients are forced to use the assigned adblock DNS instead of bypassing it.

But usually you need to specifically select the DNS hijack option configuration item in the packages options.

Blocking a specific single web page from a web server (while allowing other pages from there) is different and more complicated.

3 Likes

ok I tried this.

Anf now the router is not accessible at all.

Even If I am connected over LAN, I don’t get LAN ip adress.

So I have no clue how to connect to the router (as 192.168.1.1 is not reachable).

Is possible to do some hard reset and revert last changes ?

Yes, good comment.

I want to block whole domain, not only certain page. Sorry for wrong description and wrong topic name(it is not possible to updated now)

you probably killed dnsmasq, manually set IP on client to 192.168.1.2, and try to reconnect.

1 Like

wow, good trick. It helped :+1:

Router is back.

But what should be the correct value to disable domain ?

/f1.com/#

?

worked for me:

as slh pointed out a couple of days ago, are your clients really using your DNS ?

1 Like

situation here:

And yes, I think I am using DNS from router where I do this setup.

Btw: man, are you really using windowze ? :face_vomiting: :face_vomiting: :face_vomiting:

Hello,

I tried this one

And tab edit blocklist and it seems that one really works.

Thanks for idea :+1:

this is because:

most of them also support DNS hijack / force / local enforcement config for firewall

you haven't actually fixed anything, openwrt's adblock simply made sure the secure DNS used by your client was blocked.
you don't really need the package, you need to implement https://openwrt.org/docs/guide-user/firewall/fw3_configurations/intercept_dns.

not getting a cutting edge $3000 laptop only to find out half of the hw features in it aren't supported by Linux, yet.
sorry to disappoint, but hey, at least I know how to disable secure DNS in my OS :stuck_out_tongue:

1 Like

I setup DNS hijacking and now it works as you describe it. Perfect man :+1: :flexed_biceps:, thank you

:grinning_face_with_smiling_eyes: :slightly_smiling_face:
I am beginner in openwrt, so my question could looks silly

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