0

My client has a domain name registered at namecheap (tourmed.uk) which I want to migrate to point to the project's google cloud instance. I created a zone, added A and CNAME records pointing to the External Static IP of the instance and copied the nameservers to the domain custom dns at namecheap.

When I ping or nslookup tourmed.uk, the ip resolves fine, however when I visit on any browser or telnet, I get a timeout. dnschecker.org shows that everything is ok.

I examined network tab on my inspector and nothing gets fetched, it seems like it cannot connect to my instance, however the IP is correct.

Any help would be very much appreciated, I'm at a loss.

-----------------FIXED---------------------

Turns out, nothing was listening at port 8080 on the instance. I opened ports 80 and 443 on the google cloud firewall, configured the forwarding from 8080 to 80 and started my server and it all worked!

1 Answers1

0

From your description I summarize that you run some website or an app in the VM in question. I've checked the DNS records and they are OK but have not yet propagated all over Internet - but that is not the case here.

I also can't get anything in the browser, but SSH works which confirms that DNS is not the suspect.

Please check your firewall rules and make sure port 80 and 443 is open for the traffic. If you're not sure how to do this then you can have a look at documentation here.

I assume that you are using Linux so check if your web service is running; if you're using apache then type sudo service apache2 status or change apache for nginx or whatever you're using.

But if you're using Windows VM then also check the services - try to restart them, or even entire VM.

If that doesn't help you please provide more details (type of the OS, service) - maybe some logs etc. This will help to resolve your issue.

Wojtek_B
  • 4,245
  • 1
  • 7
  • 21
  • Thank you very much for the reply. Actually, I'm running a nodejs server on 8080. I have allowed tcp ports 80, 443 and 8080 from a firewall rule and when running "nmap 35.197.253.35 -Pn" it lists all those ports although apart from port 22 for ssh all other are closed, which from a search I believe means that no app is running there. However, on my default .appspot.com url of the instance the app is successfully running, which seems pretty crazy since "ps -e | grep node" returns nothing... – Spiros Kontolatis Jan 20 '20 at 16:37
  • I've just noticed that the .appspot.com runs on port 216.58.206.180 where 80 and 443 are open. However, my instance has got as External IP the 35.197.253.35. I don't get why does the app run on another IP? – Spiros Kontolatis Jan 20 '20 at 17:04
  • Are you running your app on the VM the domain is pointing to ? Dig command returns IP 35.197.253.35 for tourmed.uk. In my opinion no. Please check this out. – Wojtek_B Jan 21 '20 at 09:04
  • Maybe you have two IP's assigned to the VM and your app configured to respond only to x.x.x.180 ??? – Wojtek_B Jan 21 '20 at 09:24
  • I SSH'ed and opened my server manually, which listens at 8080. When I do tourmed.uk:8080 it opens the application fine. It seems that I need to forward to 8080 upon hitting tourmed.uk. Any ideas on how to do that? – Spiros Kontolatis Jan 21 '20 at 10:08
  • Maybe this will help you: https://stackoverflow.com/a/12181334/12257250 – Wojtek_B Jan 21 '20 at 10:40
  • No you didn't get me. Can I just plainly set port 80 on my nodejs server? Isn't it in use by http protocol? I was thinking more of a solution in the style of "If you get a request at http protocol port, forward it to 8080". Thank you for all your help, you have been most helpful – Spiros Kontolatis Jan 21 '20 at 10:49
  • I believe you can set port to 80 (unless you have something other already listening on it). And you can for example configure nginx to do exactly what you want (redirect from unsecure port 80 to SSL'ed port 443). – Wojtek_B Jan 21 '20 at 10:54
  • Turns out you can't listen at 80. I ran the commands on https://serverfault.com/questions/320614/how-to-forward-port-80-to-another-port-on-the-samemachine in my machine and now it's working. Thank you very much for the help! – Spiros Kontolatis Jan 21 '20 at 11:30