V
V
ViktorGuerro2019-04-02 16:54:00
Domain Name System
ViktorGuerro, 2019-04-02 16:54:00

One white IP address from the provider redirect on mikrotik to 2 servers?

Rostelecom gives one white ip address: XXX.YYY.ZZZ.112, so far, one domain name is attached to it: name1domain.ru via reg.ru, coming to the mikrotik port. There are 2 servers (website): 192.168.10.241 and 192.168.10.240. On the second (192.168.10.240) there is already a forwarding to mikrotik. Is it worth registering a second domain name to the same white ip address? How to make it possible to access 2 domain names by one ip address (ie, to both sites)?
For example, a person enters:
1) name1domain.ru and gets to 192.168.10.240,
2) name2domain.ru and gets to 192.168.10.241.
And all this through one white ip address.
PS I didn’t find the article or didn’t look for it well, if you know, then just write back.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
ViktorGuerro, 2019-04-04
@ViktorGuerro

Implementation with nginx, Thanks to "Sanes":
https://www.dmosk.ru/miniinstruktions.php?mini=ngi...

S
Sanes, 2019-04-02
@Sanes

Nginx Proxy if different servers. If there is one, then several sites on the same IP will get along fine.

D
d-stream, 2019-04-02
@d-stream

1. the domain name is not registered to the address
2. virtual host - most web servers can do this and you don't even need to fence several computers for nat - just one that will serve at least 100,500 different sites.
Moreover, most web servers have long been sharpened for this with a good separation of authority levels.

D
dollar, 2019-04-02
@dollar

The only solution I see " on the forehead " is to have a separate web server or web proxy on Mikrotik.
The fact is that information about the domain is transmitted in the HTTP or HTTPS protocol, and the web server is engaged in parsing this protocol. Further, this web server can redirect the call to another server - these are the details.
You can, of course, come up with some kind of filter, but keep in mind that the request is made by the browser, and different browsers, as well as all sorts of bots, can form request headers differently, depending on the version, settings and supported features in the browser. It should be a pretty smart filter.
And since such a song went, then why, in fact, Mikrotik? Then you can put a full-fledged server as a router with all the flexibility that implies.
Well, as another option - move your sites to one server, for example 192.168.10.240.

F
fara_ib, 2019-04-02
@fara_ib

And if the registrar makes a redirect for one domain name to the address and port XXX.YYY.ZZZ.112:80, and for another to XXX.YYY.ZZZ.112:81. Then, on Mikrotik, forward them by port to one and the other web server. nic.ru had such a service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question