Hello!
We have setup Mikrotik with multiple internal networks (Servers, DMZ and others). There is a server which are configured to use Servers and DMZ networks. The server’s default route is on DMZ network, but additional routes for Servers network. Now there is a port which server listens on Servers network IP 172.16.0.10 (non default route). How to make port forwarding to IP which is assigned to non default route?
for example
(Server’s net IP)
172.16.0.10 ------172.16.0.0/24—Mikrotik Device---------WAN-----
10.0.0.10--------10.0.0.0/24--------------|
(Server’s DMZ net)
Port forwarding itself will be the same, but you need to make sure that server will send replies the right way. You can do it either on server or using a trick on router. On server, you’d need to send replies via same interface that the connection came from, but it depends on server (e.g. Linux with iptables can surely do it). The other way is to use same principle described here, add srcnat rule, make all traffic look like it’s coming from router’s address and replies will go the right way automatically. But loosing ability to see original source addresses might be a problem.
Thank you.
The link you provided worked for https://server.dom
The problem is that the full url has to be accessible via separate port, for example 81, eg,: https://server.dom:81
And such URL does not work. There is no traffic on rules with port 81. Any comments on this?
If you forwarded port 443 and it works, I don’t see why it would not work if you forward port 81 exactly the same way as 443.