LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-02-2012, 05:20 PM   #1
chandu4money
LQ Newbie
 
Registered: Mar 2012
Posts: 7

Rep: Reputation: Disabled
Squid help needed - Urgent


Hello all,

I'm new to squid i was getting this error while accessing.

ERROR
The requested URL could not be retrieved

The following error was encountered while trying to retrieve the URL: http://www.gulte.com/index.php

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.


Log :

login as: root
root@208.77.23.178's password:
Last login: Sat Mar 3 02:00:36 2012 from 106.206.57.140
[root@blastingrdp ~]# vi /etc/squid/squid.conf
http_access allow localnet
http_access allow localhost

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

# Squid normally listens to port 3128
http_port 8080

# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
# Recommended minimum configuration:
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

s

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

#
# Recommended minimum Access Permission configuration:
#
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
acl our_networks src 192.168.1.0/24 192.168.2.0/24
http_access allow our_networks
http_access allow localnet
http_access allow localhost

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

# Squid normally listens to port 3128
http_port 8080

# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320




Please help me out...

Last edited by chandu4money; 03-02-2012 at 05:23 PM.
 
Old 03-02-2012, 06:25 PM   #2
chandu4money
LQ Newbie
 
Registered: Mar 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
20views no replies?
 
Old 03-02-2012, 07:22 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
what do you expect in one hour ?

also by "bumping" your own thread you REMOVED it from the "zero reply " list

Quote:

# And finally deny all other access to this proxy
http_access deny all
you have blocked all online access

1)
What operating system is this ? the icon under your name says MS windows and Win 98 to boot ???????
2)
what version of squid ?
 
Old 03-03-2012, 02:27 AM   #4
chandu4money
LQ Newbie
 
Registered: Mar 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks John VV for replying to my thread.

My os is Centos6 and Squid latest version!

what to edit in conf file?

Last edited by chandu4money; 03-03-2012 at 02:30 AM.
 
Old 03-03-2012, 02:56 AM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
how did you install squid ?
this is the preferred way
Code:
yum install squid
squid-3.1.10-1.el6_2.1.i686.rpm
is in the 6.2 updates

have you read the wiki ?
http://wiki.squid-cache.org/SquidFaq/ConfiguringSquid

http://wiki.squid-cache.org/FrontPage


from a google search of "squid CentOS6"
the fifth entry
http://www.isp.com.pk/internet-guide...ing-squid.html
 
Old 03-03-2012, 03:24 AM   #6
chandu4money
LQ Newbie
 
Registered: Mar 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
John VV installed that way only. atlast it was working on port 3128 and can able to browse thru it.

But how to change port 3128 to port 80?
 
Old 03-03-2012, 03:55 AM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you really do not want to use port 80

8080 is a normal secondary port
and you use a text editor

a terminal based ( no gui) is "vi" or "nano" both should be installed
if you do not have the "vi" commands memorized then use nano

Code:
su -
--- your root password when asked for ----
nano /etc/squid/squid.conf
--------- or for vi---------
vi /etc/squid/squid.conf
 
Old 03-03-2012, 04:01 AM   #8
chandu4money
LQ Newbie
 
Registered: Mar 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
John i have edited that file


# Squid normally listens to port 3128
http_port 80

after editing it was not getting start...


Stopping squid: ................ [ OK ]
Starting squid: .................... [FAILED]




but not works...

Last edited by chandu4money; 03-03-2012 at 04:04 AM.
 
Old 03-03-2012, 04:07 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you do not want to use "80"
that is a very bad port to use
 
Old 03-03-2012, 04:23 AM   #10
chandu4money
LQ Newbie
 
Registered: Mar 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Ok i configured to use 8080 and service has been started. but can't access from my pc. some where i saw we need to configure ip tables?

Help me!

Stopping squid: ................ [ OK ]
Starting squid: . [ OK ]
[root@blastingrdp ~]# netstat -tulpn | grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 4086/(squid)
 
  


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
Help needed..Urgent pegulza Linux - Distributions 5 09-30-2009 01:55 PM
URGENT case. Experience on Squid content filtering needed J77 Linux - Networking 2 06-25-2006 10:14 PM
Urgent - Help Needed rigel_kent Linux - General 1 07-21-2005 08:20 AM
Urgent Help Needed rankxeros Linux - Security 5 03-08-2004 04:32 PM
Urgent help needed the_twister Linux - Security 4 08-13-2003 09:58 AM

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

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