Overriding DNS

How to override name server resolution in Floods

Sometimes your test scripts will point to DNS records that either aren't public or have specific IP addresses. You can override DNS by uploading a .hosts file with your test plan. It doesn't matter what you call the file, as long as it has the extension .hosts for example, demo.hosts

In this file you can then specify an IP address to return for any host in the given domains. Queries in the domains are never forwarded and always replied to with the specified IP address which may be IPv4 or IPv6. You can also add wildcards/

For example, address=/#/ will always return for any query not answered from /etc/hosts or DHCP and not sent to an upstream nameserver. We use Google's nameservers for resolution and

One or more domains with no address returns a no-such-domain answer, so address=/example.com/ returns NXDOMAIN for example.com and all its subdomains.

A more common example is just to override a specific subdomain, address=/loadtest-staging.flood.io/ will return for loadtest-staging.flood.io

You can override multiple entries with multiple lines:


Last updated