Answer the question
In order to leave comments, you need to log in
How to assign an ip address to a domain with a port?
There is a domain.pp.ua domain, and there is also an ip address xxxx on which ports 11180, 2213 are open...
It is necessary that xxxx:11180 opens when switching to domain.pp.ua or www.domain.pp.ua;
when switching to ssh.domain.pp.ua, xxxx:2213 opened...
Is it possible to do this, and if so, how?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
You can make an http redirect so that when accessing http://domain.pp.ua, the web server on port 80 redirects the browser to http://xxxx:11180. This is for http. With SSH most likely nothing will come of it.
ssh port settings can always be hard-coded in the ssh client or alias configs to call unix ssh to a specific server.
http settings can be either at the web server level or redirected through the .hml page
<head>
<meta http-equiv="refresh" content="5; url=http://вашсайт:порт/">
</head>
<body>
<p>Через 5 секунд Вы будете перенаправлены на <a href="http://вашсайт:порт/">сайт проекта</a></p>
<p>Спасибо</p>
</body>
No, you can't do that. A domain is, simply, a human-readable "name" for an ip address. The port cannot be encoded in the domain.
Those. you will have to write ssh.domain.pp.ua:2213.
Well, if we are talking about http, then you can do it with rewrites or proxying =)
You can configure ssh on the client - https://debian.pro/395
If we are talking about an arbitrary protocol in general, then no, these are different things. DNS records (with the exception of SRV records for specific protocols like xmpp) only point to any ip.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question