D
D
dmisavenko2020-09-17 15:21:15
Computer networks
dmisavenko, 2020-09-17 15:21:15

How to reach from the local network via external IP and forwarded port using Mikrotik?

Given:
1. Service running on the local network with address localaddr:80
2. Port forwarding configured (working successfully) to access this service at externaladdr:8080 from the Internet.

Task:
Organize the ability to access the service from the local network at the external address and port 8080. Now this does not work. There is a difficulty with port substitution, solutions for working with one port exist and are understandable.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Melnikov, 2020-09-17
@Mi11er

There are 2 ways.
First HNAT On micro, something like

13    ;;; Hikvision vlan1.50
      chain=dstnat action=dst-nat to-addresses=192.168.50.254 protocol=tcp 
      dst-address-type=local dst-port=8000 log=no log-prefix="" 

14    ;;; Hikvision vlan1.50
      chain=srcnat action=masquerade protocol=tcp src-address=192.168.0.0/16 
      dst-address=192.168.50.254 dst-address-type=local dst-port=8000 log=no 
      log-prefix=""

The second way, Split DNS.
ps But, if your traffic is chasing port 80, then make an nginx server with Reverse proxy somewhere in the middle, drive all 80/443 there and proxy to yourself there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question