LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 07-23-2010, 07:02 AM   #1
khodeir
Member
 
Registered: Feb 2009
Distribution: Debian
Posts: 243

Rep: Reputation: 33
my squid questions


hi all,
i am preparing all my things to make a proxy server using squid
i have some miss understands
i will add them here whenever i had a problem

first :
why i cant reach the net when i make this
Quote:
http_access deny all
http_access allow all
when i reverse the sentences it work!!!

second :
what does this line mean
Quote:
acl all src 0.0.0.0/0.0.0.0
does it mean all the ips ?
i don't understand why it is written like that
any explanations?

Last edited by khodeir; 07-23-2010 at 07:05 AM.
 
Old 07-23-2010, 09:00 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
OK, well you block *EVERYTHING* and then allowed it all after you've denied it already... That's clearly still blocked. Similarily if you reverse the order, everything is allowed. the configs are read and applied in the order they appear in the file.

0.0.0.0/0.0.0.0 means everything. absolutely all addresses.
 
Old 07-23-2010, 09:07 AM   #3
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Hi khodeir,

Quote:
first :
why i cant reach the net when i make this
Quote:
http_access deny all
http_access allow all
when i reverse the sentences it work!!!
It is depend on last line of access list. By default last line is deny all.

I can not write more (i am bit lazy )read http_access section in squid.conf file for more info.

Code:
#       If none of the "access" lines cause a match, the default is the
#       opposite of the last line in the list.  If the last line was
#       deny, the default is allow.  Conversely, if the last line
#       is allow, the default will be deny.  For these reasons, it is a
#       good idea to have an "deny all" or "allow all" entry at the end
#       of your access lists to avoid potential confusion.
Quote:
second :
what does this line mean
Quote:
acl all src 0.0.0.0/0.0.0.0
does it mean all the ips ?
i don't understand why it is written like that
Yes, it means all ip and subnet.
you can use this acl as
Code:
acl all src all
i hope it clear your doubts.

HTH
 
Old 07-23-2010, 09:07 AM   #4
khodeir
Member
 
Registered: Feb 2009
Distribution: Debian
Posts: 243

Original Poster
Rep: Reputation: 33
wasn't better to write it as follows
Quote:
0.0.0.0/255.255.255.255

and what does this mean
Quote:
If none of the "access" lines cause a match,

Last edited by khodeir; 07-23-2010 at 09:09 AM.
 
Old 07-23-2010, 09:11 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no it's not better to write it as 0.0.0/255.255.255.255 as that means the exact opposite, it means nothing, as every single bit of the address is blocked out.
 
Old 07-23-2010, 09:11 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
"If none of the "access" lines cause a match, " means that one of the lines that start with the word "access" needs to relate to the traffic it's processing.
 
Old 07-23-2010, 09:13 AM   #7
khodeir
Member
 
Registered: Feb 2009
Distribution: Debian
Posts: 243

Original Poster
Rep: Reputation: 33

i can't understand it
very confusing to me
i feel my mind stuck
 
Old 07-23-2010, 12:28 PM   #8
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
read the docs here
 
Old 07-23-2010, 02:59 PM   #9
khodeir
Member
 
Registered: Feb 2009
Distribution: Debian
Posts: 243

Original Poster
Rep: Reputation: 33
I have read a lot
some help me with texts and explanation
but i could still not understand
if some one could provide an example it will be good
 
Old 07-23-2010, 03:40 PM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by khodeir View Post
I have read a lot
some help me with texts and explanation
but i could still not understand
if some one could provide an example it will be good
If you did read the documentation, you must have skipped the part where the EXAMPLES ARE.

Also, did you try Google? There are thousands of documents (with examples), available.
 
Old 07-23-2010, 04:06 PM   #11
khodeir
Member
 
Registered: Feb 2009
Distribution: Debian
Posts: 243

Original Poster
Rep: Reputation: 33
i tried google but didn't reach any thing coz i didn't know what to write in it"key words"
 
Old 07-23-2010, 09:38 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by khodeir View Post
i tried google but didn't reach any thing coz i didn't know what to write in it"key words"
Spell out your words.

And since you're looking for squid access control rule examples, why not try "squid access control rule examples in Google??? I get about 95k hits....
 
Old 07-25-2010, 02:31 PM   #13
khodeir
Member
 
Registered: Feb 2009
Distribution: Debian
Posts: 243

Original Poster
Rep: Reputation: 33
i found this link ,
it is too helpful
link
 
  


Reply



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 questions saran_redhat Linux - Newbie 4 02-16-2010 11:14 PM
Squid Configuration Questions! SBN Linux - Software 8 07-25-2006 05:04 AM
squid questions roopunix Linux - Networking 1 06-28-2005 05:08 AM
Questions about Squid Tr@ce Linux - Networking 1 04-18-2005 12:55 PM
squid questions kviper97 Linux - Networking 8 03-10-2005 06:19 PM

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

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