LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-05-2011, 01:50 PM   #1
silveringking
LQ Newbie
 
Registered: Feb 2011
Location: The deepest corner of hell also known as Northern Portugal.
Distribution: Linux Mint, Ubuntu
Posts: 26

Rep: Reputation: 1
Configuring squid


Hi, I installed squid on my centos and I tried to follow some guides but it still gives the same error

Quote:
ERROR
The requested URL could not be retrieved

While trying to retrieve the URL: http://www.google.com/

The following error was encountered:

* Access Denied.

Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.

Your cache administrator is root.
Generated Sat, 05 Mar 2011 17:28:22 GMT by ks33022.kimsufi.com (squid/2.6.STABLE21)
I tried to change my ip from the external one to ipv4 here are my changes:

Quote:
#Recommended minimum configuration:
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl ZON-BFC0 src 192.168.1.2
acl to_localhost dst 127.0.0.0/8

...

# And finally deny all other access to this proxy
http_access allow ZON-BFC0
http_access deny all
ZON-BFC0 is the name presented in my wireless connection, plus the actual ip I'm using there is the ipv4 I found with a quick "ipconfig" search on DOS.

Can you help me out?
 
Old 03-06-2011, 11:04 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,294

Rep: Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698
Hi,

Try to add the netmask and see if it works:
Code:
acl ZON-BFC0 src 192.168.1.2/32
Regards
 
1 members found this post helpful.
Old 03-07-2011, 05:10 PM   #3
silveringking
LQ Newbie
 
Registered: Feb 2011
Location: The deepest corner of hell also known as Northern Portugal.
Distribution: Linux Mint, Ubuntu
Posts: 26

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by bathory View Post
Hi,

Try to add the netmask and see if it works:
Code:
acl ZON-BFC0 src 192.168.1.2/32
Regards
Didn't solve it, I should try yet another software probably. Can you guys appoint me easy to configure software? (Note: I do use centos and I have cpanel.)
 
Old 03-07-2011, 06:26 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,294

Rep: Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698
D'oh, can you try to allow the whole 192.168.1.0 subnet and see what you get
Code:
acl ZON-BFC0 src 192.168.1.2/24
I guess you're reloading the squid service after editing squid.conf
 
1 members found this post helpful.
Old 03-08-2011, 08:54 AM   #5
silveringking
LQ Newbie
 
Registered: Feb 2011
Location: The deepest corner of hell also known as Northern Portugal.
Distribution: Linux Mint, Ubuntu
Posts: 26

Original Poster
Rep: Reputation: 1
I forgot, I restarted squid and this appears

Quote:
[root@ks33022 ~]# service squid restart
Stopping squid: 2011/03/08 14:51:10| aclParseIpData: Bad host/IP: '127.0.0.1/'
. [ OK ]
Starting squid: . [ OK ]
[root@ks33022 ~]#
 
Old 03-08-2011, 10:04 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,294

Rep: Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698
I cannot see an error in the snippet you've posted.
Check the logs to see if you find in which line of squid.conf is the error. Or perhaps run
Code:
squid -k parse
to get more details
As a last resort you can comment out either one or both the 2 acls (localhost and to_localhost) and see why squid is complaining
 
1 members found this post helpful.
Old 03-08-2011, 03:51 PM   #7
silveringking
LQ Newbie
 
Registered: Feb 2011
Location: The deepest corner of hell also known as Northern Portugal.
Distribution: Linux Mint, Ubuntu
Posts: 26

Original Poster
Rep: Reputation: 1
Quote:
aclParseIpData: Bad host/IP: '127.0.0.1/'
It gave me this error again (probably you didn't saw it above.
 
Old 03-08-2011, 04:52 PM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,294

Rep: Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698
I saw it, that's why I told you to check the logs and/or comment out the 2 acls involving 127.0.0.1.
I guess it's just a warning because in newer squid versions the notation 127.0.0.1/255.255.255.255 is deprecated. You can use 127.0.0.1/32 instead. Besides service restarts normally as it gives an [OK]
 
  


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
configuring squid Trio3b Linux - Security 3 12-30-2005 03:08 PM
configuring squid Faizan Linux - Networking 1 05-05-2005 01:12 PM
Configuring Squid phatboyz Linux - Software 2 02-18-2004 08:39 AM
configuring squid santosh Linux - Networking 5 07-31-2002 11:22 AM
Help me in Configuring Squid ACL tina_gora Linux - Networking 0 05-22-2001 03:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:38 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