Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
Huh, use iptables? –  alex Mar 2 '11 at 9:24
    
can you give me some example? –  Wolfy Mar 2 '11 at 11:57
add comment

2 Answers

up vote 1 down vote accepted

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
BindAddress 127.0.0.1
share|improve this answer
add comment

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.

share|improve this answer
    
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 '11 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 '11 at 17:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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