1

I am trying to make a squid proxy server accept connections from my ip-

For this I have added the following lines to the config file--

acl mynet src 122.179.44.192
acl use_ip myip 2604:c00:a:1:0:1:9074:9c80

The first line above refers to my PC (from which I want to use the proxy server), and the second is an IPv6 IP address for the proxy server itself.

To enable usage of the 2 ACL's as given above, the following lines have been added by me to the config file--

http_port 80
http_access allow mynet
http_access allow use_ip

But when I try to use the proxy server, it is refusing connections? Am i missing something here? What is wrong/missing in my config?

UPDATE- Output of this command--

netstat -lnp | grep squid

is given below--

tcp        0      0 :::3128                     :::*                        LISTEN      5285/(squid)
udp        0      0 0.0.0.0:35556               0.0.0.0:*                               5285/(squid)
udp        0      0 :::40451                    :::*                                    5285/(squid)
Arvind
  • 501
  • 4
  • 9
  • 18

2 Answers2

4

I frequently find I've neglected to reconfigure the firewall.

Try 'service iptables stop' and then try again - it will probably work then.

Don't forget to run 'service iptables start' again afterwards.

If stopping the firewall temporarily fixed it, add a suitable line to your iptables config file (/etc/sysconfig/iptables on my centOS system).

Tom
  • 41
  • 1
2

If you are getting the error "proxy server is refusing connection", then your proxy server may not be running.

If you are getting "access denied", then you need to check your acl.

Khaled
  • 36,533
  • 8
  • 72
  • 99
  • Or it may not be listening on the IP address you are trying to connect. – David Schwartz Apr 25 '12 at 11:59
  • @DavidSchwartz: Yes, sure. – Khaled Apr 25 '12 at 12:02
  • @Khaled i am getting "Proxy server is refusing connection" but when I log in to server via SSH and type in "service squid start" then I received a message "Starting Squid: OK"- even after that I am receiving the same error message- what am i missing here? Thanks... – Arvind Apr 25 '12 at 12:10
  • @Arvind: Can you please post the output of `netstat -lnp | grep squid`? Also, post the IP your are requesting and how you are requesting locally or remotely. – Khaled Apr 25 '12 at 12:11
  • @Khaled - the output of the command is now added to the question, I am requesting data from my local PC (IP=122.179.44.192) which tries to connect to the proxy server at IP= 2604:c00:a:1:0:1:9074:9c80 – Arvind Apr 25 '12 at 13:28