0

I created an instance from the canonical AMI that have ubuntu server 12.04 64bit and install squid.

The only changed to the /etc/squid3/squid.conf file was:

acl localhost src 127.0.0.1/32 ::1

per

acl localhost src 127.0.0.1/32 ::1 MY_IP_ADDRESS

and I can't use the squid from MY_IP_ADDRESS. Any idea what the problem is? What other thing I must change? I can connect using telnet to the 3128 port perfectly and when I type some garbage and type ENTER squid reply some HTML and log the following:

1336796623.133 0 MY_IP_ADDRESS NONE/400 4016 NONE error:invalid-request - NONE/- text/html

so no firewall problem neither squid.conf syntax error.

Beside, I did the same thing with an ubuntu server using virtualbox and all work fine.

From the EC2 instance telnet google 80 and all is fine, so no outside connection problem neither.

The rare thing is that squid logs don't put anything. Any idea?

3
  • Will be very helpful if someone do the same thing, just take 5min, and test if the result is the same. I mean, create an Ec2 instance, install squid and change that line in the conf file.
    – user58366
    May 12, 2012 at 17:00
  • I have three instannces running with Squid in EC2 without any problem. I had to enable the port in the EC2 web console. There was no trick. May be you have problem with your ISP, have you tried to connect to the proxy with another ISP? At home, I have to change the port of Squid because my provider blocks port 3128. May 12, 2012 at 18:58
  • Thanks @diegows, but as I said, my browser connect perfectly to the 3128 port. Anyway, I change the port to 443 and nothing. Beside, squid cache.log reflect that fact after increase the debug level from 1 (the default) to 3. The problem is that I can't found anything interesting in such messages. Anyway I will try bypass my ISP tunnelling my connection from my PC to the squid as a way to discard that my ISP is blocking squid connection in a more sophisticate way than a simple port block.
    – user58366
    May 13, 2012 at 13:48

1 Answer 1

0

well, I just did something similar but not identical, so I will write a checklist of things for you to verify. I followed the instructions at ubuntu help page

I had the following setting in the acl block (different IP).

acl home src 50.50.50.50

Additionally, according to step 3, I also added the following in

http_access allow home

Considering that you entered 127.0.0.1, there are a few things to verify. Here 127.0.0.1 means, squid only allows from the EC2 server itself, so you most likely have to use lync or other such tool to send requests from ec2. I guess you are testing from your home computer and it is not 127.0.0.1. You should find out your public IP address and enter it in your config.

Additionally, you specified /32 in your IP. Verify, that it is needed. For public IP addresses it is not. It would be required in a network setup, but probably not needed in your scenario.

I was able to get it working, hopefully you will too.

You must log in to answer this question.