Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation on limiting squid access to certain stratum 1s #223

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from

Conversation

jblomer
Copy link
Member

@jblomer jblomer commented Nov 30, 2023

No description provided.

@jblomer jblomer requested a review from vvolkl November 30, 2023 10:23
::

acl cvmfs dst <a stratum 1 host name>
acl cvmfs dst <another stratum 1 host name>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this works, seems like you can't redefine an ACL with same name.

I got an error like this (in output of sudo systemctl status squid.service):

FATAL: Bungled /etc/squid/squid.conf line 8: acl stratum_ones src <PRIVATE_STRATUM1_IP>

(where <PRIVATE_STRATUM1_IP> was an actual IP address, with < >)

You can put domains and IPs on one single line though, like:

acl stratum_ones dstdomain .eessi.science <PRIVATE_STRATUM1_IP>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps newer squids changes the config syntax... but in your example, it's a src ACL and not a dst ACL. Could this be the problem?

Comment on lines +72 to +73
acl cvmfs dst <a stratum 1 host name>
acl cvmfs dst <another stratum 1 host name>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend instead using dstdom_regex because it does a string match instead of looking up the names in the DNS and caching them. That makes it able to tolerate chages in IP addresses of the destination name without having to reload squid. So the example would be:

acl cvmfshost dstdom_regex ^(a\.stratum1\.host|another\.stratum1\.host)$

I'm not sure if there can be mutiple regexes for the same name, I haven't tried it. Probably there could be.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe a better example would be since those two are in the same "domain":

acl cvmfshost dstdom_regex ^(a|another)\.stratum1\.host)$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants