How to block all torrent websites ?

There are several ways you can block a website:
1. DNS Blocking: Use DNS Filtering to block a website. This can be done with PiHole or AdGuard or similar. Its easy to circumvent by using DNS over HTTPS/TLS
2. IP Blocking: For smaller website with relatively unchanging IP, you can block the website by IP Address. However, this isn't always effective as IP Address of domain is derived from DNS. If a website updates DNS often and your router can't update as quick. The site won't be blocked quickly.
3. DPI: Use Deep Packet Inspection to look at SNI and block it or similar methods.

For blocking torrent entirely you'll need to do DPI. But even then it can be bypassed by VPN.
 
Instead of trying to block "all" torrent websites (a.k.a. blacklist or deny-list) you should whitelist or allow-list whatever websites you want to allow from your router if it supports that. Because you can't know the entire range of websites that offer torrents do you?
 
Whitelist will be a nightmare, imagine going through adding a new domain, it's dependant domains, cdn domains and more each time you visit a new website.

You can create an OpenDNS account and use it to filter your network. Also block port 53 so no one can bypass it.

Of course, encrypted dns and even a simple free VPN from play Store can bypass any of these restrictions. Censoring the open internet is almost impossible.

OP it's more realistic to just deal with the client than the network.
 

Top