0

I have a CentOS VPS running Tomcat on port 80 and HTTP on port 81. I didn't know how to configure DNS. I searched and figured out there are websites that give you DNS. So I got DNS address from cloudflare.com and set it up on my domain. Now I can access my websites running on tomcat.

Everything works fine but I can't access other ports by typing domain names like:

example.com:81

But I can do it by typing:

192.0.2.1:81 

So I want to know is there any way to access other ports by domain names or simply that is not possible and if not why?

5
  • What is the error you got when trying with MyDomain.com:81 ?
    – krisFR
    Sep 24, 2017 at 14:22
  • @krisFR nothing happens. just loading on browser Sep 24, 2017 at 14:27
  • Is that somehow related to this? Try to use port 8080 instead of 81 and test again.
    – Thomas
    Sep 24, 2017 at 14:28
  • 1
    My guess is the service you found is not actually a DNS service. If your VPS has IP address 192.0.2.1 and you got the domain name example.com hosted on a DNS service and pointing to your VPS, that would mean example.com resolves to 192.0.2.1. If that was the case http://example.com would probably produce the same result as http://192.0.2.1. That's why I am guessing the service you found is not DNS but rather a proxy. And likely example.com resolves to a proxy such as 198.51.100.1 which only listens on port 80 and forwards the requests to 192.0.2.1.
    – kasperd
    Sep 24, 2017 at 19:53
  • If your question provided real addresses, it would be possible to provide a definitive answer to the question and not just guesses.
    – kasperd
    Sep 24, 2017 at 19:54

1 Answer 1

1

So this seems to be related to that Cloudflare does proxying even DNS queries and only allows a limited amount of ports.
The available ports are listed on the Cloudflare page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .