I thought Pihole(dnsmasq) could help me route 2 ddns domains to 2 IPs on PiHole setup on eth0 and eth0:1, one hosting site via nginx, the other apache. It's a long story WHY but I can't use nginx to reverse proxy.
Inside my LAN both websites work, outside they resolve only to a.ddns.net.
I created /etc/pihole/lan.list based on /etc/hosts
192.168.1.173 a.ddns.net raspberrypi3
192.168.1.174 b.ddns.net raspberrypi3
and restarted pihole dns
Is it possible to resolve FQDN to 2 IP on same server as pihole ?
Expected Behaviour:
When I curl a.ddns.net outside my LAN I expected it to be directed via PiHole DNS to 192.168.1.174 using nginx on port 80/443.
Same for b.ddns.net -> 192.168.1.173 apache 80/443
Actual Behaviour:
I see local.list doesn't add my lan.list nor what is in /etc/hosts
So, if I understand correctly, it is possible to do this.
I meant 'outside' my LAN since my intent is to make both website available outside my LAN.
I deleted lan-list and reloaded pihole FTL and now I get similar nslookup to you on LAN client.
Outside my LAN curl on both sites looks better but I get SSL cert mismatch. I'll play with the setting a bit more to see if I can get the final step done.