Как сделать Squid Proxy, чтобы разрешить все соединения с разных IP

3102
user469790

Я настроил прокси Squid на моем VPS на DigitalOcean . Но у меня есть проблема - мой домашний IP-адрес постоянно меняется, так как он динамический. Я пытался использовать no-ip (так как он бесплатный), но когда я добавляю acl myhome srcdomain mydomain.no-ip.org, я не могу подключиться к прокси.

Я также попытался добавить точку в mydomain.no-ip.org, но все равно не повезло. Поэтому я решил открыть его для всех, поэтому независимо от того, какой у меня домашний IP, я не могу подключиться к squid.

Как я могу позволить squid принимать все входящие соединения, независимо от исходного IP-адреса? Или есть ли обходной путь?

1

1 ответ на вопрос

0
dakka

Did you also use this after you defined the ACL:

http_access allow myhome 

Another suggestion if you cant get the no-ip to work, is perhaps defining an entire range of IP's. If you track your IP changes you should be able to work out a list of addresses. In my case I usually I only get a few addresses and they are all in the same networks.

Eg. I will get something like: 192.168.1.25 and then only the last 1 or 2 numbers change. So you could simply allow all IP's from 192.168.0.0. Not the nicest solution, I think your no-ip solution is much better if u can get that to work.

EDIT: Some info on how to enable more debug info to work out why you cant get access, In squid.conf enable debugging for section 33 at level 2. For example:

debug_options ALL,1 33,2 

Restart squid then try and use your proxy, when it fails to work check the cache.log for the error. That should hopefully tell you why its not working.

Also just as a test to make sure your no-ip domain is working correctly as sometimes it takes a while for DNS to catch up, use:

nslookup no-ip-host-name 

That should return your IP address, check to make sure that is actually your IP. If they dont match its because the DNS servers configured are a bit slow to update. I found OpenDNS is pretty quick for updates. Let me know if you need more info.

на самом деле, я уже разрешаю это. но я не могу подключиться при использовании no-ip. но когда я использую `acl myhome src my-public-ip-here` вместо` acl myhome srcdomain no-ip-domain-here`, я могу подключиться к Интернету. так что я сделал, я разрешаю все. но я не знаю, если это хорошая идея, так как любой может использовать это, когда они знают ip моего сервера squid user469790 8 лет назад 0
да, это делает ваш прокси общедоступным, у вас будут люди, использующие это очень скоро. Люди используют сканеры портов, чтобы найти их. Так что лучше всего это исправить. Я добавил больше информации в мой ответ для вас. Надеюсь, это поможет. dakka 8 лет назад 0

Похожие вопросы