LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   deny addresses (https://www.linuxquestions.org/questions/linux-server-73/deny-addresses-745734/)

alsharifhoussam 08-07-2009 01:08 AM

deny addresses
 
Hello,
I had a Linux as router and several computers connected to it, is there a way to deny some websites for specific IPs on the LAN?
Thanks

vikas027 08-07-2009 01:13 AM

Quote:

Originally Posted by alsharifhoussam (Post 3634424)
Hello,
I had a Linux as router and several computers connected to it, is there a way to deny some websites for specific IPs on the LAN?
Thanks

yes, it is possible through SQUID. You can set up a transparent proxy.


See this http://www.cyberciti.biz/tips/linux-...uid-howto.html

vikas027 08-07-2009 01:26 AM

I guess this can also implemented through tcp wrappers. Not very sure, but yes if this works it would be much easier.

http://www.linuxtopia.org/online_boo...pwrappers.html

There are two files basically.
- /etc/hosts.allow
- /etc/hosts.deny


Examples;
You can put /etc/hosts.allow
Code:

ALL EXCEPT .ORKUT.COM      :    192.168.1.
ALL EXCEPT .FACEBOOK.COM  :    192.168.1.27

This will block orkut.com for everyone in network 192.168.1.X and block facebook.com & orkut.com both for 192.168.1.27

Hope this helps. This should work.


All times are GMT -5. The time now is 08:56 AM.