Multiple IP DNS Host Alias
Guest last edited by
I was wondering if someone could point out my mistake here. I'm attempting to create an alias for a DNS Host that has multiple IPs associated with it. Then by using firewall rules change the gateway for these DNS hosts.
I have an issue though that it is only routing the first IP it finds in the DNS record. How can I make it so that all the IPs associated with that domain are routed?
I use Astaro in another location and it's a simple task of adding a "DNS Group" definition but I guess this is probably called something different in PFSense. I have tried both Hosts and Networks Aliases.
cmb last edited by
Aliases that use FQDNs cannot be used with ones that return multiple IPs, or change on each query, it only uses the first IP.
Actually, I'm not sure if it's new for 2.1 or not but we do use all IPs returned in a query for aliases.
A rotating answer (one that changes each query) can't be used effectively, but if a query always returns the same set of IPs, that should work.
If I add an alias for "www.google.com" and add it to a rule, the resulting table contains many IPs.
I'd have to track down a 2.0.1 box to see if the behavior is the same, but I thought it was there. Perhaps it's the method used by your DNS server to return the IPs that isn't working.
$ host www.google.com www.google.com is an alias for www.l.google.com. www.l.google.com has address 126.96.36.199 www.l.google.com has address 188.8.131.52 www.l.google.com has address 184.108.40.206 www.l.google.com has address 220.127.116.11 www.l.google.com has address 18.104.22.168
: pfctl -T show -t google 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11