1

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.

1

2 Answers 2

0

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.

2
  • 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, 2013 at 17:00
  • 1
    I'm talking about "reload" not "restart". You will lose the cache only when restarting.
    – Doomsday
    Jun 18, 2018 at 9:17
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .