LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how can i block a site? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-block-a-site-841109/)

turf 10-29-2010 03:12 AM

how can i block a site?
 
i added an ip and the url in /etc/hosts
but it seems not working
Code:

64.233.181.99                google.com
how can i do it?

acid_kewpie 10-29-2010 03:31 AM

well adding entries, unless deliberately incorrect, will do nothing whatsoever to block a web site.

in what sense are you trying to block it? You need to provide a lot more information to get the help you want. Generally the answer would be to use a proxy and filter specific domain names, but we've no idea if that actually meets your requirements.

turf 10-29-2010 03:35 AM

just want to block porn site.. they could'nt probably figure out using proxies. they're just users in this internet cafe.

acid_kewpie 10-29-2010 03:45 AM

"this internet cafe"??? As in your internet cafe? Properly run internet cafes will use portal sites to provide access via proxies with authentication services etc... it's nothign for the users to do, it's the network owners responsibility totally.

turf 10-29-2010 03:48 AM

i am the owner

acid_kewpie 10-29-2010 04:15 AM

Well in that case this doesn't really sound like the sort of question you should be asking. An internet cafe IT solution will already have this functionality installed as a real default. What is the setup you're actually running?

Or is the answer to suggest you ask your technical support for the service you're renting from them??

turf 10-29-2010 04:20 AM

lolz.

anyone else can answer this please.


i only have 4 computers. one in each port of the router although i have 8 ports. i manually install each computer. its not even networked so onli one computer can print.
so i have to figure each computer what ever i do to one of it.

prayag_pjs 10-29-2010 04:21 AM

Hi,

Hope you have Linux Expertise to install the Linux Gateway Server with Transparent proxy with Dansgaurdian.

For blocking sites you can use squid with Dansgaurdain.

here are the links.

http://www.howtoforge.com/dansguardi...tu-9.10-karmic

http://www.thornock.us/presentations/dansguardian/

f14f21_2 10-29-2010 03:37 PM

Quote:

Originally Posted by acid_kewpie (Post 4143102)
Well in that case this doesn't really sound like the sort of question you should be asking. An internet cafe IT solution will already have this functionality installed as a real default. What is the setup you're actually running?

Or is the answer to suggest you ask your technical support for the service you're renting from them??

no, you need to help people not confuse them Mr ..
hi turf, you definitely need to install squid and when you install and configure it (it's so simple) you can use following line in /etc/squid.conf :

Code:

acl bad url_regex -i google.com badwebsite.com
http_access deny bad

or

Code:

acl bad url_regex google.com badwebsite.com
http_access deny bad

sorry i'm not sure of "-i " is correct or not but thats make uppercase and lower case the same

have nice time

pljvaldez 10-29-2010 03:47 PM

I'll throw up another option that's relatively simple: configure your router to use OpenDNS and then go setup an account there. They have built in filtering for certain types of content. It's not as effective as setting up your own squid proxy, but it works well enough in most cases and requires low technical expertise.

jefro 10-29-2010 05:15 PM

Get a hosts file to begin with.
http://www.mvps.org/winhelp2002/hosts.htm

Then go to untangle.com for either a free or for pay way to help protect your place.

From your hosts file example you should have put 127.0.0.1 to block the url. One could get past tha if they knew the actual IP. Hosts only block FQDN's and other Named resources.

You really want a layer 7+ virtual or real machine or hardware I'd think.

Soadyheid 10-29-2010 06:10 PM

Quote:

i only have 4 computers. one in each port of the router
Have you checked your router? I've got a Netgear one which allows you to set up a list of sites to block, No setting up any computer attached to it, the router does it all. I'd assume Linksys, Belkin, etc routers work in a similar fashion.
Point your browser at the router, the IP is usually 192.168.1.1 or perhaps 192.168.1.0 and log into the Admin page. You'll need the admin password of course.

Play Bonny! :hattip:

cheesewizz 10-29-2010 06:48 PM

Quote:

Originally Posted by turf (Post 4143104)
lolz.

anyone else can answer this please.


i only have 4 computers. one in each port of the router although i have 8 ports. i manually install each computer. its not even networked so onli one computer can print.
so i have to figure each computer what ever i do to one of it.


Linux security does not have to be complex,
and simplicity does not have to mean sacrificing power.

With linux you will have a firewall up and running in minutes.

For simple blocking website you can use modern linux firewall but you should have knowledge on LINUX. search in google site.


Thanks


All times are GMT -5. The time now is 09:19 PM.