0

I'm working on a solution with an offshore team and I want to create my server on European union for GDPR requirements.

I want to create a subdomain.domain.example on my OVH control panel and make a redirection of a given IP4:PORT (IP4 is provided by dev team, PORT is for example 4000) to this subdomain on OVH.

I mean when a user types the URL: subdomain.domain.example it will redirect him take him to IP: PORT

What I've done so far

1- I have created an invisible A redirection to this IP4, so I can see the content of the IP web hosting when I type domain.example or www.domain.example

What's missing I've tried SRV and A redirections but can't find how to make it with port number?

The expected result is to type a subdomain.domain.example and see the content of the IP4:PORT

Is there any solution on DNS records on OVH portal or how to configure a reverse proxy because I've seen lot of discussion about reverse proxies but don't know how to do it on OVH portal

Patrick Mevzek
  • 9,273
  • 7
  • 29
  • 42
  • 2
    DNS does not do port numbers. If you want to have different things on different ports, use rewrites or proxies. If you don't know how to set things up with your provider, contact your provider's help desk. – Jenny D Jul 09 '19 at 06:25
  • 1
    Browsers do not use `SRV` records. Otherwise they would have solved your problem, as `SRV` records certainly encode port numbers! – Patrick Mevzek Jul 09 '19 at 14:43

1 Answers1

1

no, DNS can't redirect the request to a different TCP Port, what DNS does is resolve fqdn do IP, if you need to change the request from one TCP port to another you need something to forward the request.

Please check if this helps: Nginx: How do I forward a http request to another port?

Diego Souza
  • 111
  • 4
  • "DNS can't redirect the request to a different TCP Port", it certainly can (but redirect would not be the appropriate term, this is more for HTTP land, except if speaking about `DNAME` records), see `SRV` records for example. The problem is that **browsers** do not take these records into account. – Patrick Mevzek Jul 09 '19 at 14:45
  • SRV records are used to locate services location, not to redirect requests. – Diego Souza Jul 09 '19 at 16:01
  • sample SRV record usage: https://support.microsoft.com/en-us/help/816587/how-to-verify-that-srv-dns-records-have-been-created-for-a-domain-cont – Diego Souza Jul 09 '19 at 16:03
  • If browsers had taken into account `SRV` records, then any HTTP/HTTPS request could have been "diverted" to any port. Or redirected if you prefer. The feature is there, and is used by multiple protocols, like SIP. Or LDAP. It is just NOT used by browsers, here is the problem. The problem is not the DNS. – Patrick Mevzek Jul 09 '19 at 16:18
  • i would Set it up as reverse proxy and finito ;) – djdomi Jul 20 '19 at 14:30