Score:1

How to ban access to .zip TLDs?

sx flag

After seeing a lot of articles and videos about a new .zip top level domain I want to block it to not to accidentally fall for it. For example, now all zip file names (attachment.zip for e.g.) are converted to links by web aware programs.

I searched for ways to block/redirect to localhost requests for sites on this domain, but failed. /etc/hosts doesn't support masks and other solutions seems too complicated:

  • setting up rules in iptables
  • installing and setting up dnsmasq

Is there some more or less easy solution for seemingly easy task - ban access to site/domain by mask/regexp?

I'm using Kubuntu 22.04

cn flag
"After seeing a lot of articles and videos about a new .zip top level domain" share a few with us. And please not about targetting windows ;) "are converted to links by web aware programs." Unless I do not understand it ... this is a mime type thing. Browser on Ubuntu are sandboxed. Files outside the sandbox can not be addressed. That includes the mime type file. But like stated: I really don't get it... please share some articles. I have never heard about this and securing our personal systems is one of my job tasks ;-)
cn flag
Oh and please do not trust articles that are from anti-virus companies. All they want is to sell you a license. 99.99999% of the things they claim are NOT affecting Linux and are only to scare Windows users that have no idea about Linux :-D
Score:1
cn flag

Frame challenge: that isn't realistic.

Ubuntu (and Linux in general) is not Windows. So when looking at a specific type of attack, double-check that it would be applicable to Linux and not just Windows. But... you still asked the question, and let's say you want to do it regardless.


But... you still asked the question, and let's say you want to do it regardless of that.

Also, the phrase "ban access" implies "everyone on that computer". For redirecting, you'd need a proxy (which is beyond the scope of this answer).

So let's head back to blocking. Imagine you have a page someone on your PC tries to visit, say, https://example.zip. Your computer needs to turn that domain into an IP address as part of "accessing" that website. It does this via DNS. Ok, you go and point your system DNS resolver at some other DNS resolver that doesn't resolve that TLD. It seems like you're done. You may need to flush a cache, depending on your system, but it should be blocked... or... not?

Turns out, some browsers, including Firefox have their own way of doing DNS resolving. While it can be disabled, note that users can likely go change the DNS settings in Firefox to something other than what you want (causing that TLD to function for them again).

By the way, you didn't specify browsers. From the CLI, apps can theoretically just query whatever DNS server they feel like. It is (often) bad-practice. But don't expect just changing your DNS server to stop a determined user/program from evading your TLD ban.


So, you'll need to be somewhat more clear about what you actually need

  • Why do you want to ban it? More specifically, what threat are you trying to protect against?
  • Are users on the machine willing to mess with browser DNS settings, potentially un-doing your changes? That will make blocking it way harder
  • Is there some other way to accomplish what you're going for?

This isn't to say it is flat-out impossible. But, there are a lot of complications with trying to all-out ban a TLD on your machine.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.