Jump to content

Recommended Posts

Posted

Hi All,

 

I have squid setup up running and I want to add IP addresses to a text file and load that into the squid config. Then I can just add a new IP address to the file and it will work without restarting the service.

 

I have tried this in the config but it is not working:

 

acl localnet src "path/to/file/trusted_ip.txt"

 

obviously I changed the path to the correct one!

 

Am I missing something? The txt file has only one ip address init that I am using to test with:

 

10.143.20.96/255.255.255.255

 

If i add this line:

 

acl localnet src 10.143.20.96/255.255.255.255

 

It works perfectly however, the ip address will be random and i do not want to have to restart the squid service.

 

Is this possible?

Posted

Yes, it's possible but you still have to tell squid to re-read its config file. Either run 'squid -k reconfigure' or send a HUP signal to the running process.

 

What I do is have a background process running which watches the text file and sends squid a HUP (that's the Unix 'Hang Up' signal) whenever the file's timestamp changes.

Posted

Thanks for the reply, When I point the conf at the txt file it does not work. If I enter the IP into the conf file directly it works.

 

Is there anything special I need to do to get IP addresses working from an external file?

Posted

It defiantly has permissions to view it. it is very strange that putting it directly in the config works but the txt doesn't!

 

Not sure what to try next!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...