How to configure a static wildcard subdomain with dnsmasq.
- by Prody
I have a network behind a NAT with a few machines.
The machines are:
router - NAT, dnsmasq, forwarding - directly connected to the inet
server - which runs ssh, www and some other stuff
clients - which do stuff on server
I also have mydomain.com.
server.mydomain.com is pointing to my connection's IP (single IP), which is the router, which forwards ports to server.
Server, has a httpd running, which serves different sites based on vhosts.
So I have site1.server.mydomain.com, site2..
The problem is that all the traffic is going thru the router, and when I check logs I always see the router's IP for everything (so it's hard to see who is running the script with the while(1)).
I would just ServerAlias site1.server.local, but most of the sites have a root URL saved somewhere on top of which other URLs are built, so I can't do that.
The solution for me would be telling dnsmasq somehow to answer to *.mydomain.com with server's IP.
Is this possible somehow?