1

First sorry for my English. Second I configured a squid in authentication mode on port 8888. and redirect my network traffic eq www via a route-map to squid server. and in server iptables redirect traffic on port 80 to 8888(squid port).

-A PREROUTING  -s 10.32.3.0/24 -p tcp --dport 80 -j DNAT --to 64.23.45.12:8888

but when i browse a web in ie this error present:

The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: /
Invalid URL

And this messege present in access.log:

1281752166.811      0 10.32.3.12 NONE/400 1744 GET / - NONE/- text/html

But when I set every ip(not squid ip) in ie proxy setting with port 80 ;

present authentication window then my requested web.

P.S when configure squid via transparent mode , it work fine.

Here is my squid.conf:

visible_hostname black    
maximum_object_size 64000 KB    
dns_nameservers 4.2.2.4    
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd    
acl ncsa_users proxy_auth REQUIRED
acl snmppublic snmp_community squiz    
acl manager proto cache_object    
acl localhost src 127.0.0.1/255.255.255.255    
acl SSL_ports port 443 563 8443    
acl Safe_ports port 80 1000 443 563 70 20-65535 280  488 591 777 5555 465  210 21    
acl CONNECT method CONNECT    
http_access allow  ncsa_users    
http_access allow manager localhost    
http_access deny manager    
http_access deny !Safe_ports    
tcp_outgoing_address 64.23.45.12
http_port 8888    
cache_mem 20 MB
cache_dir ufs /var/spool/squid 100 16 256
access_log /log/access.log
cache_store_log none
cache_effective_user nobody
http_access deny all
3
  • 1
    Please put your config file and any relevant commands you ran within code tags like the example in this link meta.stackexchange.com/questions/22186/…
    – Prix
    Aug 14, 2010 at 7:30
  • Isnt any idea Pls?
    – slevin
    Jan 21, 2011 at 3:40
  • Have you read comment above your one?!
    – Ency
    Jan 30, 2011 at 22:28

1 Answer 1

1

I guess it's conceptually impossible to be Transparent and Authenticated mode at the same time.

If you want authentitcation don't use transparent proxy. Users must configure proxy ip/user/pass manually.

If you want transparent proxying there's no place for user/password introduction there.

Your only solution would be to use a hotspot, but i don't think you could do that with Squid alone (you'd need something like Nocat).

1
  • Thanks. but i think when i set every ip with port 80 in explorer proxy setting,my planned process work properly and connect to port 80 proxy and it redirects to port 8888 squid,but without it,web request by explorer doesnt connect to proxy as port 80.
    – slevin
    Aug 14, 2010 at 10:32

You must log in to answer this question.