I got a hEX router from my ISP
The network is very basic with the router behind an optical modem and a switch connected to "interface=ether2"
I'm trying to do port forwarding for some services of my nas.
I tried to follow this https://help.mikrotik.com/docs/display/ ... forwarding to forward 5510 to 192.168.2.107 and 53975 to 5001 of 192.168.2.107
but they remain closed when I test them after a reboot.
I would be very grateful if someone is able to guide me !
Thanks
Code: Select all
# sep/10/2024 14:33:32 by RouterOS 6.49.8
# software id = 95FC-39E1
#
# model = RB750Gr3
#
/interface vlan
add interface=ether1 name=vlan2900 vlan-id=2900
/interface pppoe-client
add add-default-route=yes disabled=no interface=vlan2900 keepalive-timeout=\
disabled name=pppoe-out1 user=############
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool2 ranges=192.168.2.100-192.168.2.200
add name=dhcp_pool3 ranges=192.168.3.100-192.168.3.200
add name=dhcp_pool4 ranges=192.168.4.100-192.168.4.200
add name=dhcp_pool5 ranges=192.168.5.100-192.168.5.200
/ip dhcp-server
add address-pool=dhcp_pool2 disabled=no interface=ether2 name=dhcp2
add address-pool=dhcp_pool3 disabled=no interface=ether3 name=dhcp3
add address-pool=dhcp_pool4 disabled=no interface=ether4 name=dhcp4
add address-pool=dhcp_pool5 disabled=no interface=ether5 name=dhcp5
/user group
add name=Utilisateur policy="local,reboot,read,write,policy,web,!telnet,!ssh,!\
ftp,!test,!winbox,!password,!sniff,!sensitive,!api,!romon,!dude,!tikapp" \
skin=utilisateur
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=ether1 list=WAN
add interface=ether2 list=LAN
add interface=ether3 list=LAN
add interface=ether4 list=LAN
add interface=ether5 list=LAN
/ip address
add address=192.168.2.1/24 interface=ether2 network=192.168.2.0
add address=192.168.3.1/24 interface=ether3 network=192.168.3.0
add address=192.168.4.1/24 interface=ether4 network=192.168.4.0
add address=192.168.5.1/24 interface=ether5 network=192.168.5.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1
/ip dhcp-server lease
add address=192.168.2.107 client-id=1:90:9:d0:32:36:2f mac-address=\
##:##:##:##:##:## server=dhcp2
/ip dhcp-server network
add address=192.168.2.0/24 gateway=192.168.2.1
add address=192.168.3.0/24 gateway=192.168.3.1
add address=192.168.4.0/24 gateway=192.168.4.1
add address=192.168.5.0/24 gateway=192.168.5.1
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
192.168.88.1
/ip dns
set servers=8.8.8.8,8.8.4.4
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" \
in-interface-list=LAN protocol=icmp
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
disabled=yes in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN
add action=drop chain=input comment="defconf: accept ICMP" protocol=icmp \
src-address=!##.###.##.###
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN port=2000 protocol=tcp
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface=pppoe-out1
add action=dst-nat chain=dstnat dst-port=5510 in-interface-list=WAN protocol=\
tcp to-addresses=192.168.2.107 to-ports=5510
add action=dst-nat chain=dstnat dst-port=53975 in-interface-list=WAN \
protocol=tcp to-addresses=192.168.2.107 to-ports=5001
/ip firewall service-port
set ftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
set pptp disabled=yes
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh address="192.168.2.0/24,192.\
168.3.0/24,192.168.4.0/24,192.168.5.0/24" port=2222
set www-ssl certificate=Hotspot disabled=no port=48443
set api disabled=yes
set winbox disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Paris
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN