Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How to add a user with the domain name example.com to Squid's default configuration file? By default Squid is configured to only accept requests from localhost. I'd like to add one more domain to the access list. The domain is in the external network (Internet).

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Add

acl example_com srcdomain   .example.com

to your squid.conf. I suggest you group it with your other acls, but it doesn't matter where you put it. You then need to add

http_access allow example.com

in the http_access section. The order of http_access does matter, as it checks the access against them from top to bottom. You need to put it before the line that says:

http_access deny all

It's worth pointing out that you're allowing access based on reverse DNS lookups. Anyone can change their reverse DNS to point at this domain. It's security by obscurity. No one is likely to bother, but they could.

share|improve this answer
    
David: Thanks, would this be enough to process HTTPS requests? –  Alex Aug 9 '09 at 8:34
    
That would depend massively on your existing http_access rules. It would appear that the standard Debian/Ubuntu config allows equal access to https and http. –  David Pashley Aug 9 '09 at 10:53

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.