Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I specified a dyndns domain name in a ACL of Varnish, so only IPs of this domain name should be allowed.

This is working fine until my IP changed. Then I get a forbidden error until I restart varnish.

How often does varnish refresh the DNS lookup?

I know it might be slow to do such lookups, but this is anyways not a production site.

share|improve this question
    
Seems impossible? gossamer-threads.com/lists/varnish/misc/22159 –  Alex Oct 26 '12 at 10:31
add comment

2 Answers

With few lines of scripting you will be able to do that.

You need to setup a shell script which its purpose will be to periodically dig +short your domain name and if IP has changed, will reload varnish.

share|improve this answer
    
Not necessary. A varnish reload is enough. On parsing the config, varnish always does a lookup. Problem: Varnish reload looses the cache. –  Alex Feb 19 '13 at 17:00
add comment

On parsing the config, varnish always does a lookup. Problem: Varnish reload looses the cache.

Solution: Using the varnish console load the new config under a different name, remove the old one.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.