Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
How to block using /etc/hosts for home network
I have several computers at home and I was trying to block off some websites by using
I thought that since we are sharing one router to access the web, we therefore share the same ip address. So what I block in my laptop is also blocked in our home network. Now I realize that I am wrong.
Can somebody please be so kind to share how I may be able to do so? I mean to block websites without doing it one by one on all our PCs and lappys?
Thank you very much!
Last edited by nujinini; 12-06-2009 at 02:31 AM. Reason: grammar :(nujinini
Linux User #489667
What kind of router do you have?
If you have a linux router then it's easy, use iptables, if you don't know how, here it is a example:
iptables -A FORWARD -d IP_OF_WEB_SITE -j DROP
This was not tested so I may be wrong.
Another way is to install a proxy on your router and this way you will be able to block web sites from squid(if you will be using squid as a proxy).
Each computer you want to protect must have the entry in
its own hosts file. It does not block them from contacting
you but blocks you from contacting them, by the bogus
address you put in the hosts file, such as 127.0.0.1
most routers have the ability to block websites built in, you should just poke around the router configuration page, i'm sure its there
it should be a web page, every router runs a webserver, i don't know what router you have so I can't tell you and i'm not about to go and look it up even if I did know, it should be like 192.168.0.1 or 192.168.1.1