A
A
AlexanderSuz2021-11-11 12:32:37
Mikrotik
AlexanderSuz, 2021-11-11 12:32:37

Configure Mikrotik to access local server by domain name from internal network?

Greetings, I have the following initial data:

Subnet: 192.168.3.0/24
Router: 192.168.3.1
Server: 192.168.3.14
Static external IP: 2.2.2.2
Domain: domain.com

The domain is bound to IP and works fine if you enter from outside. However, if you try to go from inside the subnet to an external IP or domain, then nothing happens.

How to break the rules so that you can reach the local server 192.168.3.14 from the local network named donain.com / via external IP

The rules are now

1 chain=dstnat action=dst-nat to-addresses=192.168.3.14 to-ports=80 protocol=tcp dst-address=2.2.2.2 dst-port=80 log=no log-prefix="" 

2 chain=dstnat action=dst-nat to-addresses=192.168.3.14 to-ports=80 protocol=tcp src-address=192.168.3.0/24 dst-address=2.2.2.2 dst-port=80 log=no log-prefix="" 

3 chain=srcnat action=src-nat to-addresses=2.2.2.2 protocol=tcp src-address=192.168.3.0/24 dst-address=192.168.3.14 dst-port=80 log=no log-prefix="" 

4 chain=dstnat action=dst-nat to-addresses=192.168.3.14 to-ports=443 protocol=tcp dst-address=2.2.2.2 dst-port=443 log=no log-prefix="" 

5 chain=dstnat action=dst-nat to-addresses=192.168.3.14 to-ports=443 protocol=tcp src-address=192.168.3.0/24 dst-address=2.2.2.2 dst-port=443 log=no log-prefix="" 

6 chain=srcnat action=src-nat to-addresses=2.2.2.2 protocol=tcp src-address=192.168.3.0/24 dst-address=192.168.3.14 dst-port=443 log=no log-prefix=""


I tried other rules that were in the next topic with the same question, nothing started.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Barbolin, 2021-11-11
@dronmaxman

I did not come up with anything new, this question was asked 100 times on toster.
Options 2
1) Harpin NAT
2) Set as DNS on clients 192.168.3.1, register a static A record on the microtext (domain.com A 192.168.3.14).
The second option is preferable. With the first option, all clients on the server will be visible under the address 192.168.3.1.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question