EvilZone
General Tech => Networking => : Derric September 25, 2015, 02:01:47 AM
-
I run a small OpenVPN based VPN for my friends, and they are idiots and need to be blocked from a few websites.
How can I block them from accessing say, facebook.com? Like fully block them?
-
Maybe iptables can help?
http://superuser.com/questions/626813/openvpn-squid-or-another-way-of-blocking-advertisements-websites
-
Pretty sure in /etc/hosts you can specify a specific IP address for a given domain name.
So you can just put a line in there that redirects the site you want to block to the local host.
If you don't want facebook.com or www.facebook.com to go through, you can put these lines in the hosts file:
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
You might also want to review:
http://unix.stackexchange.com/questions/175621/how-to-block-the-social-websites-in-centos-through-proxy
Please use google search next time: 'centos block website'
-
The DNS null routing is a great idea and works like a charm, mobile apps use other domains/urls so you gotta make sure you catch all of it, can be a pain.