Answer the question
In order to leave comments, you need to log in
What is the best way to add external IPs from VPS to Mikrotik for port forwarding?
There is a mikrotik router, a server is connected to the router, a lot of different services are running on different ports in docker on the server ... I want to register VPS, take their IP and bind them to services. I want to tie it to Mikrotik because it is more convenient to monitor and set up rules through it.
What is the easiest and best way to do this?
Most likely, you need to set up a VPN server on the router and connect VPS to it as clients. On the VPS, redirect all ports via VPN to Mikrotik, and from it I already need from the right clients to the server. Or is it some kind of game?
And if I need, for example, for certain services to set some kind of VPS as the gateway, then it won’t work or is it another task? For some services, it is also important that they could not find out the main IP, which means that packets must be sent on behalf of the VPS...
It should look something like this:
normalVPS0 <=> router <=> server <=> service0 (8080tcp) tcp_protectedVPS1
<=> router <=> server <=> service1 (80tcp/443tcp) tcp_protected_VPS1
<=> router <=> server < => service2 (8080tcp)
protected_by_udpVPS2<=> router <=> server <=> service3 (3004upd)
Or it can combine everything in 1 VPN ... and VLAN to each VPS as a gateway + send traffic from each VPS to a server.
Answer the question
In order to leave comments, you need to log in
It will be up to you how it will be for Mikrotik (but you need to plan the necessary pool of subnets in advance, VLAN is a suitable way).
Further, if Mikrotik has a public address at home in the office, it is easier to use the native ip-to-ip tunnel.
Further, it's a matter of technology - we mark traffic with a mangle - we make default gateways with these marks, we configure routing.
We do it on the first tunnel, work it out, document it, scale it up to N-tunnels until we run out of money or micros.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question