A
A
Andrew2016-09-20 21:11:37
Mikrotik
Andrew, 2016-09-20 21:11:37

Access to network resources through an external IP, being in the same network?

Greetings colleagues!
Help solve the problem:
There is an Internet with a dedicated ip, for example, 31.31.31.31 connects to the Mikrotik 1 router, a dhcp server with an internal ip 192.168.1.1-254 is raised on the router, then Mikrotik 2 is connected to it via optics with the assigned ip 192.168.1.2, on Mikrotik 2 also raised a dhcp server with a mesh 192.168.88.1-254, cameras with ip 192.168.88.64,65,66 are connected to Mikrotik 2
For clarity, the scheme:
209b810f90f0448097fefb06160376fa.png
I need to access the camera via an external IP to connect to it through a mobile application on the phone .
I make the following settings to forward the camera to the Internet. On mikrotik 1 I forward port 8000 to 192.168.88.64 it looks like this:

add action=dst-nat chain=dstnat dst-port=8000 in-interface=ether1 protocol=tcp to-addresses=192.168.88.64 to-ports=8000

Next, I specify the route to the grid 192.168.88.1-253. Like this:
add distance=1 dst-address=192.168.88.0/24 gateway=192.168.1.2

What happens: being on the 4G Internet on a mobile phone, I can connect to the camera and watch it via an external IP, but as soon as I connect my phone to wi-fi Mikrotik 2, access stops. Still being in the mikrotik 2 network and entering ip 31.31.31.31 in the browser, I go to the mikrotik 1 admin panel. Something is missing in the settings ... which is not clear ...
Colleagues, help me figure it out!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Chilikin, 2016-09-21
@MrKatarsis

Just solved this problem last week.
Only I had a port: 99, but the essence does not change

V
vreitech, 2016-09-21
@fzfx

the passphrase is nat loopback.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question