Community discussions

MikroTik App
 
yevpro
just joined
Topic Author
Posts: 22
Joined: Sun Feb 05, 2017 9:12 pm

DSTNATing

Wed Mar 28, 2018 11:40 am

Hello!
I have NVR in my lan. I would like to publish it to internet and be able to access it with public ip not only from wan, but also from lan.
I have at the moment the following rule:

add action=dst-nat chain=dstnat comment=NVR_EXT dst-port=81 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.1.100 to-ports=80

Now it is possible to access NVR from lan by its local address 192.168.1.100 and from internet 1.1.1.1:81. I want to be able to access NVR from LAN by external address: 1.1.1.1:81. How to achieve it?

Thanks!
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 3096
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: DSTNATing

Wed Mar 28, 2018 11:42 am

 
solar77
Long time Member
Long time Member
Posts: 586
Joined: Thu Feb 04, 2016 11:42 am
Location: Scotland

Re: DSTNATing

Wed Mar 28, 2018 12:19 pm

Or add you public IP as dst address in your firewall rule. you may have to remove In Interface List as well.
 
yevpro
just joined
Topic Author
Posts: 22
Joined: Sun Feb 05, 2017 9:12 pm

Re: DSTNATing

Wed Mar 28, 2018 5:34 pm

Or add you public IP as dst address in your firewall rule. you may have to remove In Interface List as well.
You mean like this:
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=1.1.1.1 dst-port=81 \
protocol=tcp to-addresses=192.168.1.100 to-ports=80
 
solar77
Long time Member
Long time Member
Posts: 586
Joined: Thu Feb 04, 2016 11:42 am
Location: Scotland

Re: DSTNATing

Wed Mar 28, 2018 5:40 pm

yes. give it a try.