I need to block access to Facebook in my office on certain PCs that are connected to a LAN. I tried using the hosts file, it works for www.facebook.com but not for https://it-it.facebook.com/, how can i block that ? Maybe block all Facebook IPs ? I have a firewall but my PCs doesn't have static IPs so i can't block only the PCs i want to.
Asked
Active
Viewed 3,733 times
0
-
You could try blocking all of Facebook's IP addresses. The following IP address ranges belong to Facebook: 66.220.144.0 - 66.220.159.255 and 69.63.176.0 - 69.63.191.255 and 204.15.20.0 - 204.15.23.255 – May 21 '14 at 15:04
-
1That's the Italian FB login, are you going to block every language? What about proxies? I'd recommend addressing the problem rather than the symptoms. – Raystafarian May 21 '14 at 15:04
-
This is a field many network admins face and, without a proxy server and/or firewall that can be configured to reject requests to an entire domain using web filters etc, you'll find it very difficult to achieve with the resources and configuration you have. – Kinnectus May 21 '14 at 15:06
1 Answers
0
Unfortunately - and sorry to be the bearer of bad news - the windows hosts file does not support wildcards or similar. It would be brilliant if *.facebook.com could be put into HOSTS, but it wouldn't work.
This leaves you with the following choices:
- Company proxy to filter web traffic by groups
- lots of lines in your hosts files (it-it.facebook.com, facebook.com, static.fbcdn.com etc)
- some sort of dns blocking program... have a quick google around and see what you can find, there are a few good free ones out there
- Block facebooks IP range on your router. this link lists all of their IP ranges.
Fazer87
- 12,520
- 1
- 36
- 48
-
My problem is the fact that my PCs doesn't use static IPs, so i have to work on the single machine i need to block. I tried to block it-it.facebook.com but it doesn't work, that would be enough for me. – SilentRage47 May 21 '14 at 15:19