URL Table aliases don't support FQDNs or names that return >1 IP
In my testing (pfSense 2.4.3-p1 as well as 'master') the only Alias type that supports FQDNs is "Host". This is limiting. One of the things I want to be able to do with aliases is to centrally distributing white- or black-lists containing a mix of IPs, subnets, and FQDNs. Some of these FQDNs may return multiple IPs, or a mix of IPv4 and IPv6 records, e.g.
$ dig +short cnn.com A cnn.com AAAA 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 2a04:4e42::323 2a04:4e42:200::323 2a04:4e42:400::323 2a04:4e42:600::323
I created a quick patch that enables URL Table aliases to return a mix of IPv4/IPv6 entries as well as accomodate multiple entries per FQDN. I did very limited testing with this but "it works for me". Before I submit a PR could someone please comment? Please go easy on me it's been a year since I've touched pfSense code...
#1 Updated by Luke Hamburg over 1 year ago
I added timeout values to the dig command, but rather than 2 separate commits for this tiny patch, I made a new branch that has them squashed:
#3 Updated by Luke Hamburg over 1 year ago
Also, I should probably redo this patch in pure PHP and use dns_get_record() http://php.net/manual/en/function.dns-get-record.php instead of shell functions to avoid the forking.