Discussion:
[Dnsmasq-discuss] Wildcard DNS on amazon EC2 instance
Lorenz Vanthillo
2015-11-12 12:09:54 UTC
Permalink
I have OpenShift v3 installed on an Amazon EC2 instance. It's not a
problem when you don't know OpenShift to answer this question. OpenShift
contains a router and routes which makes it possible to access services
by their hostname (for example www.example.com).


In my initial configuration I was working like this:


I linked a service and a hostname.On my own PC (not the server), I edited /etc/hosts and added the following:


52.18.247.x myapp.apps.example.com


52.18.247.x is my public IP of the amazon instance. This was working.
So I could acces myapp.apps.example in my browser. But I knew this was
not the best way to do it. So I wanted to set up a Wildcard for
resolving this issue. I cleared my /etc/hosts on my real pc and went into my amazon instance:


yum install dnsmasq


dnsmasq is running on port 53.


vi /etc/dnsmasq.conf


add:


address=/apps.example.com/52.18.247.x


Than I did a restart:


sudo service dnsmasq restart


But it is not working and I cannot visit my services (apps) in my browser. What am I doing wrong?
Simon Kelley
2015-11-16 21:42:06 UTC
Permalink
Post by Lorenz Vanthillo
I have OpenShift v3 installed on an Amazon EC2 instance. It's not a
problem when you don't know OpenShift to answer this question.
OpenShift contains a router and routes which makes it possible to
access services by their hostname (for example www.example.com).
I linked a service and a hostname.On my own PC (not the server), I
52.18.247.x myapp.apps.example.com
52.18.247.x is my public IP of the amazon instance. This was
working. So I could acces myapp.apps.example in my browser. But I
knew this was not the best way to do it. So I wanted to set up a
Wildcard for resolving this issue. I cleared my /etc/hosts on my
yum install dnsmasq
dnsmasq is running on port 53.
vi /etc/dnsmasq.conf
address=/apps.example.com/52.18.247.x
sudo service dnsmasq restart
But it is not working and I cannot visit my services (apps) in my
browser. What am I doing wrong?
Your real pc, where you are running your browser, is not using the
dnsmasq you created on your amazon instance for DNS resolution. Try
setting the DNS server on your PC to point to the
Amazon instance.

Cheers,

Simon.
Post by Lorenz Vanthillo
_______________________________________________ Dnsmasq-discuss
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Loading...