2

I have a node js web application running on static ipaddress with port 4000. I can access my application on the internet successfully using port forwarding in router, now I want to mask my public ipaddress+port with a domain name. By that, I have obtained a domain name in freenom and use cloudflare to create DNS record, it went smooth if my web application is running in port 80 and I can't change it to 4000, port 80 is already occuppied in our local server. What will I do to achieve my goal?

This is my CloudFlare DNS record enter image description here

0

2 Answers 2

2

Cloudflare by default can proxy HTTP/HTTPS on a list of standard ports (source). See list below as of today.

If you would like to proxy on a different port (such as 4000), then you should consider using Cloudflare Spectrum which is designed for this scenario. Alternatively, change your application so that it uses one of the supported ports below.

enter image description here

0

you cant do port forwarding using dns an alternative solution is using a cloudflare tunnel inside your server and point your tunnel to port 4000 and add a cname record with the tunnel address

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community
    Jan 25, 2022 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.