LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2010, 04:12 AM   #1
turf
Member
 
Registered: Nov 2009
Posts: 94

Rep: Reputation: 15
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?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 10-29-2010, 04:31 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 10-29-2010, 04:35 AM   #3
turf
Member
 
Registered: Nov 2009
Posts: 94

Original Poster
Rep: Reputation: 15
just want to block porn site.. they could'nt probably figure out using proxies. they're just users in this internet cafe.
 
Old 10-29-2010, 04:45 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
"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.
 
Old 10-29-2010, 04:48 AM   #5
turf
Member
 
Registered: Nov 2009
Posts: 94

Original Poster
Rep: Reputation: 15
i am the owner
 
Old 10-29-2010, 05:15 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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??
 
Old 10-29-2010, 05:20 AM   #7
turf
Member
 
Registered: Nov 2009
Posts: 94

Original Poster
Rep: Reputation: 15
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.
 
Old 10-29-2010, 05:21 AM   #8
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
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/
 
2 members found this post helpful.
Old 10-29-2010, 04:37 PM   #9
f14f21_2
LQ Newbie
 
Registered: Oct 2010
Posts: 19

Rep: Reputation: 1
Quote:
Originally Posted by acid_kewpie View Post
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

Last edited by f14f21_2; 10-29-2010 at 04:44 PM.
 
Old 10-29-2010, 04:47 PM   #10
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
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.
 
Old 10-29-2010, 06:15 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,388

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
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.

Last edited by jefro; 10-29-2010 at 06:18 PM.
 
Old 10-29-2010, 07:10 PM   #12
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.0 at present.
Posts: 1,172

Rep: Reputation: 201Reputation: 201Reputation: 201
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!
 
Old 10-29-2010, 07:48 PM   #13
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Rep: Reputation: 15
Quote:
Originally Posted by turf View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
block particular web site form multiple site hosted web server and allow others lasantha Linux - Security 2 08-17-2010 02:49 PM
block particular web site form multiple site hosted web server and allow others lasantha Linux - Security 1 08-17-2010 01:09 PM
Can you block IE from using this site? resetreset LQ Suggestions & Feedback 28 07-29-2008 09:57 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration