Redirect port using dns

0

Hello I just bought a very cheap OpenVZ, it turns out that this vps the ip is shared between the users, each user has a port range available

What I want to know if it is possible to redirect port 80 of the domain to the port that I have open with apache

For example

  

mydomain.com:80 ip.publica.del.host:5712

Only that I would like to know

    
asked by Marcos Alexis Barrios Barreto 17.02.2017 в 00:21
source

1 answer

2

The quick answer is NO. But there are several alternative solutions that could help you alleviate the problem.

The problem is that the browsers do not even have support to interpret the DNS records called SRV that could give a direct solution to your problem.

Its use, hypothetically, would be as follows:

# _servicio._proto.nombre.  TTL   clase SRV prio peso puerto destino.
_http._tcp.midominio.com.   86400 IN    SRV 10   10   5712   dns.publica.del.host.

As I say, the problem is that there is no support in the browsers for that extension offered by the DNS service, so other solutions are usually used.

One of them could use one of the many free redirection services (or with very small advertising or fees) that allow to integrate in an HTML frame ( <frameset>/<frame> ) a URL (which could be http://ip.publica.del.host:5712 ), a redirection HTTP (header Location ) or other similar systems.

Examples:

  • TinyURL: Short URLs that are hard to remember ( link )
  • Webalias: Friendly URLs with pre-existing domains ( link )
  • DotTK: free own domains .TK / .ML / .GA / .CF / .GQ with support for redirection ( link )
  • DNS registrars with support for web redirection: they allow registering the domain and instead of hosting them the page redirect to the URL that is configured.

There are also CDN services (but usually they are usually paid, free ones do not usually support it) that allow you to configure the engine (backend) with non-standard ports, just as you also have the possibility of using a reverse proxy on another server dedicated you have.

    
answered by 27.04.2017 в 09:42