I've a squid3 proxy on my server ubuntu.

I would allow access to a group of sites only to a group of users. Now my simple code is this:

acl WHITELIST url_regex "/var/proxy/whitelist/test.whitelist"
http_access allow WHITELIST
http_access deny all

In to test there is only "google.it" and the proxy works.

In the server there is another user, named "test_user" with password "password".

My first problem is: how can i set in squid config on server to allow only Whitelist for only user/group?

Second problem: On the client (with Lubuntu), what should I config? I try to config /etc/environment like this:

export http_proxy=http://test_user:password@myserverip:2888/
export https_proxy=http://test_user:password@myserverip:2888/
export ftp_proxy=http://test_user:password@myserverip:2888/
export HTTP_PROXY=http://test_user:password@myserverip:2888/
export HTTPS_PROXY=http://test_user:password@myserverip:2888/
export FTP_PROXY=http://test_user:password@myserverip:2888/

EDIT: in my proxy setting I've set user and it works, but on lubuntu client firefox always ask me for password..

/etc/environment is like this:

export HTTP_PROXY=http://simone:simone@
  • Nobody can help me..? Mar 3, 2015 at 9:08

1 Answer 1

  1. prepare file contains list of user(s)
  2. prepare file contains list of sites(s)
  3. map them in squid.conf as below

    acl userlist src "/home/acl/userlist"  
    acl whitelist urlpath_regex "/home/acl/whitelist"    
    http_access allow userlist sitelist


for your second problem ,

the port number for squid3 is 3128.
so change the port number.
and you can configure your proxy settings in /etc/apt/apt.conf file as below:


note: if apt.conf file not available, create it.

Thats all !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.