B
B
beduin012015-01-22 11:38:46
Computer networks
beduin01, 2015-01-22 11:38:46

Is it possible to bind a domain to a port?

Port forwarding is configured on the router that stands between the Internet and the server.
Port 80 is assigned to 8081.
I want to bind a domain name to the server. The question is, what should I indicate in
@
A
*
? If I specify the IP, will the server understand that the request for the mysite.ru domain needs to be forwarded to port 8081?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander Bagirov, 2015-01-22
@alexbagirov

DNS does not specify any ports. If there is a firewall, then you can set up a redirect in it or proxy the required port in Nginx. Then it will look like a connection to port 80. It's more convenient, I guess.

E
Evgeny Garunovich, 2015-01-22
@evalga

If I understand correctly, you have port 80 sticking out, and port 8081 is configured on the server?
In the A record, you need to register only the IP of the server, the port is not indicated there.
To access the server from outside your network, you just need to access the domain name without specifying the port, and the router will do its job and redirect the person's request from port 80 to port 8081 of the server.

S
Sergey, 2015-01-22
Protko @Fesor

DNS allows you to resolve an IP by name, nothing more. Ports are already routing within one address and you cannot influence this from DNS.

S
Sergey Petrikov, 2015-01-22
@RicoX

If the service does not support SRV records, then it is impossible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question