[SOLVED] Squid Proxy External IP Changes
#1
Please i need a help on my squid proxy..i have setup a squid proxy on my VPS and is working fine but the only problem i have is that my externel ip keep chenges which mean i have to goto  

Terminal

nano /etc/squid/squid.conf

to change the ip in

Terminal

acl localnet src 41.189.xxx.xx

  then restart the squid for it to start working.is thier any way to make my squid proxy to accept any ip conecting to it without goto

Terminal

acl localnet src 41.189.xxx.xxx

 to chage the ip.Thanks
[Image: 2978070885.png]


Thanks to http://freevps.us and https://fuzzyhosts.com for VPS 2.and thanks to all Admins and all Moderators




#2
@emperor your thread has been moved from the General forum to the 3rd Party Help & Support forum because it is a support request for an issue related to a VPS from a 3rd party provider (as you currently don't even have a VPS with us).


In regards to your issue:

Is your external ISP IP range always the same? If it is so you can simply allocate the ACL to the whole IP range that you get assigned from your ISP. That would be the best to do for dynamic IP addresses that are usually really common for end consumer ISPs.

Allocating ACLs for IP ranges works like:
Code:
acl aclname src 123.123.123.0/24

The above example allows to connect all IPs starting from 123.123.123.0 to 123.123.123.255. Everything else is blocked from accessing your proxy

You can use http://bgp.he.net/ to find out the IP range that you got assigned.


EDIT: If you have multiple IP ranges you can allow all of them by this method by simply making multiple ALCs. One ACL per IP range.
#3
Thanks the above works for my ISP IP ranges but what if i have a different client who wants to use the squid proxy but his ip rages is different from mine how will i go about it? ..For example my Allcating ACLs IP rang looks like this  
Code:
acl aclname src 46.176.162.0/24
and my friend Allocating ACLs IP range looks like this
Code:
acl aclname src 192.168.30.0/24
how can we connect to the same squid proxy?Thanks



(2016-11-07, 2:46:03 am)Hidden Refuge Wrote:  EDIT: If you have multiple IP ranges you can allow all of them by this method by simply making multiple ALCs. One ACL per IP range.
[Image: 2978070885.png]


Thanks to http://freevps.us and https://fuzzyhosts.com for VPS 2.and thanks to all Admins and all Moderators




#4
@emperor

The answer to this question is on my post. You make multiple ACLs. For every IP range a new ACL.

Like
Code:
acl myips1 123.123.123.0/24
acl myips2 123.123.123.0/24
acl myipsn xxx.xxx.xxx.xxx/xx

And then you add ACLs for your friends IP ranges:
Code:
acl friendsip1 192.168.123.0/24
acl friendsip2 192.168.124.0/24
acl friendsipn xxx.xxx.xxx.xxx/xxx

Do not forget to enable these ACLs by adding:
Code:
http_access allow myips1
http_access allow myips2
http_access allow friendsip1
http_access allow friendsip2
...

And of course restart / reload Squid. Also note it is important to add the "http_access allow" flags at the right places in the configuration. Add them after "http_access allow localnet" in your configuration files. THE ORDER IS VERY IMPORTANT OR IT WILL NOT WORK!
#5
@Hidden Refuge thank you,you have solve my problem,.
[Image: 2978070885.png]


Thanks to http://freevps.us and https://fuzzyhosts.com for VPS 2.and thanks to all Admins and all Moderators




#6
Keep in mind to mark threads as solved with the [SOLVED] prefix once your issue has been solved.

Thread closed.




Users browsing this thread: 1 Guest(s)