I have a machine on EC2 which has an elastic IP assigned to it. I ran the following command on it to listen to udp port 53
nc -u -l 53
I then ran from a local machine (not on ec2):
nslookup blah.com <elastic ip address>
For some reason this actually resolves the ip address, and nothing appears in the output of netcat. If I run nslookup on the ec2 instance itself and specify localhost as the dns server, then it works as I would expect (you can see the requested domain in the output of netcat).
I have configured a security group to allow external access to the machine via udp port 53.
Does anyone know why this doesn't work the way I expect?
sudo nestat -tulpn
?udp 0 0 0.0.0.0:53 0.0.0.0:* 12059/nc