Page 1 of 1

Dahua DVR configuration, and phone

Posted: Fri Sep 02, 2016 12:38 pm
by achillealb
Bongiorno,
I have a problem with the routerboard 951Ui-2nd
with the first configuration as below can I connect to the DVR remotely but I can not use the phone that is connected to ether 2 with the router Thomson, the DVR is connected to the ether 4

# aug/24/2016 12:45:33 by RouterOS 6.36
# software id = 03XB-N71P
#
/interface bridge
add name=LAN
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 max-mru=1480 max-mtu=\
1480 mrru=1600 name=Abissnet password=********* use-peer-dns=yes user=\
**********
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n disabled=no frequency=auto \
mode=ap-bridge ssid=ABISSNET wireless-protocol=802.11 wps-mode=\
disabled
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
mode=dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key=\
11223344 wpa2-pre-shared-key=11223344
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-128-cbc
/ip pool
add name=dhcp_pool1 ranges=192.168.1.2-192.168.1.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=LAN lease-time=1h10m name=\
dhcp1
/system logging action
set 1 disk-file-name=log
/interface bridge port
add bridge=LAN interface=ether2
add bridge=LAN interface=ether3
add bridge=LAN interface=ether4
add bridge=LAN interface=ether5
add bridge=LAN interface=wlan1
/ip address
add address=192.168.1.1/24 interface=LAN network=192.168.1.0
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=80.91.126.35,80.91.126.34 gateway=\
192.168.1.1
/ip dns
set allow-remote-requests=yes
/ip firewall nat
add action=masquerade chain=srcnat log-prefix=""
/system clock
set time-zone-name=Europe/Tirane
/system identity
set name="H.........u"
/system leds
set 5 interface=wlan1 leds=""
/system routerboard settings
set cpu-frequency=650MHz protected-routerboot=disabled

Changed the configuration as in the phone works but I can not connect by the DVR from the remote

# aug/25/2016 12:55:31 by RouterOS 6.36
# software id = 03XB-N71P
#
/interface bridge
add name=LAN
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 max-mru=1480 max-mtu=\
1480 mrru=1600 name=Abissnet password=********** use-peer-dns=yes user=\
**********
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n disabled=no frequency=auto \
mode=ap-bridge ssid="HOTEL 1" wireless-protocol=802.11 wps-mode=\
disabled
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
mode=dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key=\
massimo1 wpa2-pre-shared-key=massimo1
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-128-cbc
/ip pool
add name=dhcp ranges=192.168.1.2-192.168.1.254
add name=dhcp_pool1 ranges=192.168.2.2-192.168.2.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=LAN name=dhcp1
/system logging action
set 1 disk-file-name=log
/interface bridge port
add bridge=LAN interface=ether2
add bridge=LAN interface=ether3
add bridge=LAN interface=ether4
add bridge=LAN interface=ether5
add bridge=LAN interface=wlan1
/ip address
add address=192.168.2.1/24 interface=ether2 network=192.168.2.0
/ip dhcp-server network
add address=192.168.2.0/24 dns-server=80.91.126.35,80.91.126.34 gateway=\
192.168.2.1
/ip dns
set allow-remote-requests=yes
/ip firewall nat
add action=masquerade chain=srcnat log-prefix=""
/system clock
set time-zone-name=Europe/Tirane
/system identity
set name="H...........u"
/system leds
set 5 interface=wlan1 leds=""
/system routerboard settings
set cpu-frequency=650MHz protected-routerboot=disabled

One of the problems, and I use Winbox and change configuration remotely, and if something goes wrong I have to call a technician there is on-site. Can you give me a hand in the configuration for acedere to Dahua DVR remotely.
Thank you

Re: Dahua DVR configuration, and phone

Posted: Fri Sep 02, 2016 1:50 pm
by voxmaster
I guess that
"/ip firewall export"
would help more to understand.
with the first configuration as below can I connect to the DVR remotely
Is it possible? I don't see any dst-nat rules.
From what side do you want to connect to DVR/Phone? WAN or LAN?

Re: Dahua DVR configuration, and phone

Posted: Sun Sep 04, 2016 12:58 pm
by achillealb
[admin@aki aduku] >> /ip firewall export
# sep/04/2016 11:57:55 by RouterOS 6.36.2
# software id = 03XB-N71P
#
/ip firewall nat
add action=masquerade chain=srcnat
[admin@aki aduku] >>

WAN connect to DVR

Re: Dahua DVR configuration, and phone

Posted: Sun Sep 04, 2016 2:56 pm
by voxmaster
/ip firewall nat
add action=netmap chain=dstnat comment=DVR-tcp dst-port=[tcp_port_dvr] in-interface=ether1 protocol=tcp to-addresses=[local_IP_of_your_DVR] to-ports=[tcp_port_dvr]
add action=netmap chain=dstnat comment=DVR-udp dst-port=[udp_port_dvr] in-interface=ether1 protocol=udp to-addresses=[local_IP_of_your_DVR] to-ports=[udp_port_dvr]
[tcp_port_dvr] - TCP port of DVR console, by default - TCP: 37777
[udp_port_dvr] - UCP port of DVR console, by default - UCP: 37778
more info abut Dahua port forwarding: https://dahuawiki.com/Remote_Access/Rem ... Forwarding

Re: Dahua DVR configuration, and phone

Posted: Sun Sep 04, 2016 3:53 pm
by achillealb
my DVR is connected Ethernet 4.
I have to change in-interface=ether1 to in-interface=ether4