You are not logged in.

#1 2022-09-06 19:57:59

lzer0
Member
Registered: 2022-05-17
Posts: 5

How to block country TLDs in a single website? Safe for Work Telegram?

I have setup a custom blocklist.conf with dnsmasq to block certain unwanted sites, it looks like this:

address=/*website.tld/#

This blocklist works for pages like computrabajo.com, where they only consist of a subdomain and a domain, blocking whatever combination like:
ve.computrabajo.com, cl.computrabajo.com, py.computrabajo.com
and so on, this effectively blocks access to the website and all of its subdomains.

However, this will not work on websites that not only consists of a subdomain, but also has many country TLDs which render the blocklist useless.
For example, google.com or translate.google.com does get blocked, but google.com.ve and translate.google.com.ve doesn't.
I want to block all the country TLD's for this specific website, without affecting navigation in other websites that also use country TLDs like like mercadolibre.com.ve

Is there a way to achieve this with dnsmasq or whatever other utility that could work with? Since the only way of solving this is manuallly adding each TLD entry (.co, .ve, .ec), so they are all entered in the blocklist and block the websites properly. But this defeats the purpose of why am using dnsmasq in the first place because the wildcard will only work with subdomains like in the first example, but won't work with sites that have so many TLD's. Any help would be appreciated.

Last edited by lzer0 (2022-09-09 16:38:01)

Offline

#2 2022-09-06 23:40:50

mpan
Member
Registered: 2012-08-01
Posts: 905
Website

Re: How to block country TLDs in a single website? Safe for Work Telegram?

It seems to me that you’re conflating domain names, which are a way of nicely naming IP addresses, with the entities behind them. For example google.com.ve and google.com have nothing in common in terms of DNS. The word “google” in them is recognized by your brain, but that connection doesn’t exist on the domain names system level. That’s different from wildcards, which are referring to subdomains in the same DNS zone.

What connects them is the entity, which controls servers not only behind google.com and google.com.ve, but also youtube.pl, snapchat.com and a whole bunch of domains looking like gibberish from /dev/urandom. So even if you could attach an asterisk for TLD, that would be a pretty leaky blockade susceptible to scunthorpe. If you want to block an entity, I believe you rather want to block their IP addresses in the firewall. Lists for some popular entities, in particular those infringing privacy, may be found on the internet. In particular large ones, like Google, usually own entire AS and those are not secret. I am not recommending any particular one, as I do not use those.

If you want to stay with blocking particular domain names, I can offer no advice.

Last edited by mpan (2022-09-06 23:42:53)


Sometimes I seem a bit harsh — don’t get offended too easily! PGP: 7C848198AE93D3BB

Offline

#3 2022-09-09 15:24:55

lzer0
Member
Registered: 2022-05-17
Posts: 5

Re: How to block country TLDs in a single website? Safe for Work Telegram?

mpan wrote:

If you want to stay with blocking particular domain names, I can offer no advice.

I see, so let's move on to a different request.

Isn't there a way to block everything in instagram.com while allowing access to the chat interface and only the chat interface? the url which is https://www.instagram.com/direct/inbox/
(I know i could just use messenger.com and that would let me chat with people on IG but that's not the suggestion I'm looking for)
nvm alr figured it out

I can't seem to block the global search on Telegram, I just want the messaging app without the global search features, isn't there a Linux alternative that isn't the official telegram app that excludes the Global Search function so it can be used as SFW? (Safe For Work)
From what I searched, it seems it's possible to build a version of Telegram without the NSFW search features, as stated in this telegram suggestion https://bugs.telegram.org/c/1107/40
I do know about Telegram CLI, but IDK if this is can help me on using the app as text-only. I don't know either how to compile a package to add or remove a specific feature.

In this case, what I am asking specifically is to prevent the photos and videos from loading, so it shows only text, in Telegram. It shouldn't be that hard but I haven't figured out a way to do it yet.

Edit: telegrand-git does the trick, it's pretty simple and it has no built-in GSR support, which is exactly what I was looking for.

Last edited by lzer0 (2022-09-10 22:33:59)

Offline

Board footer

Powered by FluxBB