I would like to configure squid in such way, so that only specific (public) ip (reverse proxy), could connect to the server, but I don't know how... can someone tell me how to do this?

  • Huh, use iptables?
    – alex
    Mar 2, 2011 at 9:24
  • can you give me some example?
    – Wolfy
    Mar 2, 2011 at 11:57

2 Answers 2


In Squid this is done by specifying the public IP address in http_port, and using loopback address for the web server and Apache may be configured like in httpd.conf to listen on the loopback address:

Port 80

Just read the squid.conf file. The default installation on Ubuntu only works for localhost. You will need to set up an ACL to enable access. This can include any address or address you choose.

You may want to review instructions for Setting up a Squid Proxy on Ubuntu. They should be applicable to most platforms.

  • I tryed to do this, but when I add some public IP, squid doesnt start... I read somewhere that squid can work like a reverse proxy... but I don't know how to configure this.
    – Wolfy
    Mar 3, 2011 at 8:55
  • 1
    @Wolfy: For a reverse proxy I would configure Apache (or nginx) to act as a reverse proxy. Apache has very good controls to restrict access by IP address and/or require a password. Apache can be configured as to cache responses if that is what you need.
    – BillThor
    Mar 3, 2011 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .