LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-26-2005, 11:40 PM   #1
hariiyer
Member
 
Registered: May 2004
Location: india
Posts: 103

Rep: Reputation: 15
squid problem


Dear all


i am using RH-9 with squid, everying thing is fine. Just i want to block hotmail.com, yahoo.com , etc...


explain me how to block


regards
hari
 
Old 01-27-2005, 12:08 AM   #2
RomanG
Member
 
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110

Rep: Reputation: 15
Hello.
old > Look at http://www.squidguard.org/config/examples/04.conf and http://www.squidguard.org/config/ generally.

edited > http://www.squid-cache.org/Doc/FAQ/FAQ-10.html
And use something like
_____________________
acl all src 0.0.0.0/0.0.0.0
acl dn dstdomain .yahoo.com .blabla.net
acl ournet 192.168.1.0/255.255.255.0


http_access deny dn ournet
http_access allow ournet
http_access deny all
_____________________

Last edited by RomanG; 01-27-2005 at 01:03 AM.
 
Old 01-27-2005, 12:27 AM   #3
hariiyer
Member
 
Registered: May 2004
Location: india
Posts: 103

Original Poster
Rep: Reputation: 15
I am not using squid guard. I want to configure in squid.

please help

regards
hari
 
Old 01-27-2005, 01:35 AM   #4
m4dj4ck
Member
 
Registered: Aug 2004
Location: the coven
Distribution: slackies
Posts: 55

Rep: Reputation: 15
RomanG did mentioned about how to block those domains from squid.conf files. You dont need to have squidguard or dansguardian to do it. Follow the below instruction and insert these lines under squid.conf file :-

acl Bad_Domains .hotmail.com .yahoo.com <others domains>
http access deny Bad_Domains

Just that simple. Noticed the "." in front of every domain name.
 
Old 01-27-2005, 01:39 AM   #5
RomanG
Member
 
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110

Rep: Reputation: 15
Yeah, I have understood and edited my answer. Thanks.
 
Old 01-27-2005, 03:31 AM   #6
m4dj4ck
Member
 
Registered: Aug 2004
Location: the coven
Distribution: slackies
Posts: 55

Rep: Reputation: 15
err... sorry..im not meaning to answer your post RomanG, my previous post is directed to harllyer. My apologizes
 
Old 01-30-2005, 11:32 PM   #7
hariiyer
Member
 
Registered: May 2004
Location: india
Posts: 103

Original Poster
Rep: Reputation: 15
Dear All,

not yet solved my problem.

please see my squid.conf






auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours


#Recommended minimum configuration:
acl all src 192.168.1.42 192.168.1.46 192.168.1.51 192.168.1.74 192.168.1.82 192.168.1.64
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443 563
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl Safe_ports port 81




# And finally deny all other access to this proxy
http_access allow localhost
http_access allow all



#Allow ICP queries from everyone
icp_access allow all


visible_hostname hari
acl FOO src 192.168.1.82
acl WORKING time MTWHF 08:30-17:30
acl denied_site_names dstdomain .mail.yahoo.com .login.passport.net/uilogin.srf?id=2 .in.rediff.com/index.html
http_access allow FOO WORKING
http_access deny FOO
http_access deny denied_site_names

acl GoodIP src 192.168.1.42
# acl GoodIP src 192.168.0.15


acl BlockedIP src 192.168.1.82
# acl BlockedIP src 192.168.0.3


# acl LimitedURL url_regex -i bbc.com
# acl LimitedURL url_regex -i abc.com


# acl GoodURL url_regex -i
# acl GoodURL url_regex -i abc123.com


acl badURL url_regex -i http://mail.yahoo.com/
acl badURL url_regex -i http://login.passport.net/uilogin.srf?id=2
# acl badURL url_regex -i chat

http_access allow GoodIP all
http_access deny BlockedIP

http_access deny badURL
 
Old 01-31-2005, 11:20 AM   #8
RomanG
Member
 
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110

Rep: Reputation: 15
What is your network architecture? To what IP's do you want to block some url's, to what allow, when?
What is your Squid version?
 
  


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
Squid Problem ajkannan83 Linux - Software 2 10-21-2005 09:48 AM
Squid Problem vivekthemind Linux - Security 16 10-04-2005 12:24 PM
problem in squid alvi2 Linux - Networking 2 03-03-2005 06:39 AM
squid problem hariiyer Linux - Networking 6 02-14-2005 06:27 AM
squid problem mchitrakar Linux - Networking 4 06-07-2004 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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
Open Source Consulting | Domain Registration