I want to programme my own anti distraction tool. I can not / do not want to use hosts or third party apps. When using IPSEC or Windows firewall, it only accepts IP adresses. There is
youtube.[264 TLD]
www.youtube.[264 TLD]
subdomains.youtube.[264 TLD]
Appearantly there is no way anymore to get a complete list of youtube sub domains.
Can someone think of a way to somehow obtain all youtube ip addresses and block them on ip level other than using brute force subdomain pinging?
The way to find all the IP addresses associated with a URL is first to find the AS Number, you can get it in http://networktools.nl/asinfo/ For YouTube get it in http://networktools.nl/asinfo/youtube.com There you get the AS Number
Primary ASN : 15169
Now, type in terminal
whois -h whois.radb.net -- '-i origin AS15169' | grep ^route
And there you will get all the IP Addresses, the list is long but you can find similar addresses that can be grouped in a subnet.