LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-17-2013, 03:26 PM   #1
hadinetcat
LQ Newbie
 
Registered: Mar 2013
Posts: 14

Rep: Reputation: Disabled
squid authentication


Im using squid-3.1.23 trying to configure username/password for authentication with local user’s (getpwname_auth). It popup for authentication but when I supply username and password doesn’t work.
Please help regard this matter.
May squid.conf

auth_param basic program /usr/local/squid/libexec/getpwname_auth
auth_param basic utf8 off
auth_param basic children 15 start=1 idle=1
auth_param basic realm Squid proxy Server at proxy.bigmama.com
auth_param basic credentialsttl 4 hours
auth_param basic casesensitive off
acl auth proxy_auth REQUIRED
http_access allow auth
http_access deny all

# 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
acl lan src 192.168.0.0/24 # my lan
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 lan
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
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 3128
# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /usr/local/squid/var/cache 1000 16 256
cache_mem 50 MB

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

# 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
visible_hostname host1.bigmama.com
cache_effective_user squid
cache_effective_group squid

access.log
1362861900.377 1 192.168.0.1 TCP_DENIED/407 4175 GET http://www.google.com/ - NONE/- text/html
1362861903.039 1 192.168.0.1 TCP_DENIED/407 4282 GET http://www.google.com/ hadi NONE/- text/html
1362861905.676 1 192.168.0.1 TCP_DENIED/407 4297 GET http://www.google.com/ hadi NONE/- text/html
1362861931.381 1 192.168.0.1 TCP_DENIED/407 4318 GET http://www.google.com/ root NONE/- text/html

More error logs from cache with set to debug_options ALL,2 29

2013/03/16 01:41:02.758| ConnStateData::swanSong: FD 12
2013/03/16 01:41:22.128| The request CONNECT www.hotmail.com:443 is DENIED, because it matched 'auth'
2013/03/16 01:41:22.128| errorpage.cc(1075) BuildContent: No existing error page language negotiated for ERR_CACHE_ACCESS_DENIED. Using default error file.
2013/03/16 01:41:22.128| The reply for CONNECT www.hotmail.com:443 is ALLOWED, because it matched 'auth'
2013/03/16 01:41:22.130| ConnStateData::swanSong: FD 14
2013/03/16 01:41:22.133| The request CONNECT www.hotmail.com:443 is DENIED, because it matched 'auth'
2013/03/16 01:41:22.133| errorpage.cc(1075) BuildContent: No existing error page language negotiated for ERR_CACHE_ACCESS_DENIED. Using default error file.
2013/03/16 01:41:22.134| The reply for CONNECT www.hotmail.com:443 is ALLOWED, because it matched 'auth'
2013/03/16 01:41:22.135| connReadWasError: FD 14: got flag -1
2013/03/16 01:41:22.135| ConnStateData::swanSong: FD 14
 
Old 03-17-2013, 03:59 PM   #2
hadinetcat
LQ Newbie
 
Registered: Mar 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
squid

It work form me after reading this thread.
http://www.squid-cache.org/mail-arch...0803/0496.html

I have convert back shadow to /etc/passwd With /usr/sbin/pwunconv

Thanks and regards
Hadi
 
  


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 proxy authentication and without authentication reaven Linux - Server 1 06-06-2011 06:52 AM
Using Active directory Authentication of parent non-squid cache to child squid cache espiya7 Linux - Server 0 05-05-2009 08:04 AM
authentication in squid haxpak Linux - Server 3 01-14-2009 11:59 PM
Authentication using squid mredloft Linux - Security 1 11-28-2008 07:56 AM
LDAP authentication for squid squid 2.6.STABLE16 release 2.fc8 farrukhndm Linux - Security 2 04-03-2008 01:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:22 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
Open Source Consulting | Domain Registration