D
D
Dmitry Baskakov2021-09-24 05:00:29
System administration
Dmitry Baskakov, 2021-09-24 05:00:29

Whether it is possible to organize DNS through ports on one ip?

There is a VPS with docker, you need to somehow correlate the domain and the desired container. It seemed to me the most logical to forward some port from the container, and then specify the ip with this port in the DNS system. However, I do not know if this is possible, and if so, through which program can this be implemented

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sanes, 2021-09-24
@Sanes

No. This is done through Nginx Proxy.

R
Rsa97, 2021-09-24
@Rsa97

For some protocols, this can be done through SRV records, for some it is not possible.

C
CityCat4, 2021-09-24
@CityCat4

DNS is a database that links a name and an IP forward and backward. And she can't do anything else . Well, also correlate the name with a certain comment (as is done in SPF / DKIM)

M
Martsial, 2021-09-25
@Martsial

It is possible to spread different containers across subdomains through a proxy like NGinx / HAPRoxy.
That is, to map subdomains to ports within the same host. In DNS, such mapping cannot be done.
subdomain1.domain.ru -> https -> haproxy/nginx -> http:port=111 -> container1
subdomain2.domain.ru -> https -> haproxy/nginx -> http:port=222 -> container2
subdomain3.domain. en -> https -> haproxy/nginx -> http:port=333 -> container3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question