Skip to content

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

Open
jblomer wants to merge 1 commit into
latestfrom
update-squid
Open

Add documentation on limiting squid access to certain stratum 1s#223
jblomer wants to merge 1 commit into
latestfrom
update-squid

Conversation

@jblomer

@jblomer jblomer commented Nov 30, 2023

Copy link
Copy Markdown
Member

No description provided.

@jblomer jblomer requested a review from vvolkl November 30, 2023 10:23
Comment thread cpt-squid.rst
::

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

Copy link
Copy Markdown

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
Copy Markdown
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 thread cpt-squid.rst
Comment on lines +72 to +73
acl cvmfs dst <a stratum 1 host name>
acl cvmfs dst <another stratum 1 host name>

Copy link
Copy Markdown
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
Copy Markdown
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)$

@DrDaveD

DrDaveD commented Dec 24, 2024

Copy link
Copy Markdown
Contributor

@jblomer I see this PR has been forgotten for over a year. Can you please respond to the comments?

@DrDaveD

DrDaveD commented Jan 23, 2025

Copy link
Copy Markdown
Contributor

@jblomer?

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