Hello
Im setup my new router configuration, new Vlans and fail-over, but im not able to make it work as before with forwarding ports from ISP to lokal devices as it was before.
I don’t know what else could i check to make it work, or what kind of mistake im doing.
Can someone please check it for me - maybe i misunderstand something ![]()
de device im trying to connect is connected do vlan10 - but its connected to the switch on port ether1 - that is untagged, so device im connecting for sure its working, its pingable, inside my network but somehow im not able to make it work on dstnat:
add action=dst-nat chain=dstnat comment="Port 8000 " disabled=yes dst-port=38123 in-interface=ether2-WAN_Darnet protocol=tcp to-addresses=192.168.10.150 to-ports=8000
add action=dst-nat chain=dstnat comment="Port 8001 " disabled=yes dst-port=38124 in-interface=ether2-WAN_Darnet protocol=tcp to-addresses=192.168.10.151 to-ports=8000
When im listening on sniffer the ip addresss 192.168.10.150, and try to connect to this device on port 38123 on my global IP from internet, i can see that thie packages are redirected to
LAN_10_PF then to bridg1 and then to ether1-LAN but there is nothing in logs later - like response from this ip address…
/interface bridge
add name=bridge1 vlan-filtering=yes
/interface ethernet
set [ find default-name=ether1 ] name=ether1-LAN
set [ find default-name=ether2 ] mac-address=xxxxxxxxxxxxxx name=ether2-WAN_Darnet
set [ find default-name=ether3 ] name=ether3-LAN_AccessPoint
set [ find default-name=ether4 ] name=ether4-WAN_Rybnet
set [ find default-name=ether5 ] name=ether5-LAN_POE
/interface vlan
add interface=bridge1 name=LAN_10_PF vlan-id=10
add interface=bridge1 name=LAN_20_PF vlan-id=20
add interface=bridge1 name=MGMTVlan88 vlan-id=88
add interface=bridge1 name=WAN_PF_to_GM vlan-id=100
/interface list
add name=WAN
add name=LAN
/ip pool
add name=dhcp_pool_vlan10 ranges=192.168.10.2-192.168.10.100
add name=dhcp_pool_vlan20 ranges=192.168.20.2-192.168.20.100
/ip dhcp-server
add address-pool=dhcp_pool_vlan10 interface=LAN_10_PF lease-time=1d name=dhcp_vlan10
add address-pool=dhcp_pool_vlan20 interface=LAN_20_PF lease-time=1d name=dhcp_vlan20
/port
set 0 name=serial0
/routing table
add disabled=no fib name=to_WAN_Darnet
add disabled=no fib name=to_WAN_Rybnet
/interface bridge port
add bridge=bridge1 interface=ether1-LAN pvid=10
add bridge=bridge1 interface=ether3-LAN_AccessPoint pvid=10
add bridge=bridge1 interface=ether5-LAN_POE pvid=10
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/ipv6 settings
set disable-ipv6=yes
/interface bridge vlan
add bridge=bridge1 tagged=bridge1 untagged=ether1-LAN,ether3-LAN_AccessPoint,ether5-LAN_POE vlan-ids=10
add bridge=bridge1 tagged=ether1-LAN,ether3-LAN_AccessPoint,ether5-LAN_POE,bridge1 vlan-ids=20
add bridge=bridge1 tagged=ether1-LAN vlan-ids=100
add bridge=bridge1 tagged=bridge1,ether1-LAN vlan-ids=88
/interface list member
add interface=ether2-WAN_Darnet list=WAN
add interface=ether4-WAN_Rybnet list=WAN
add interface=ether1-LAN list=LAN
add interface=ether3-LAN_AccessPoint list=LAN
add interface=ether5-LAN_POE list=LAN
/ip address
add address=10.0.10.1/30 interface=WAN_PF_to_GM network=10.0.10.0
add address=192.168.10.1/24 interface=LAN_10_PF network=192.168.10.0
add address=10.0.5.2/30 interface=ether4-WAN_Rybnet network=10.0.5.0
add address=192.168.88.11/24 interface=MGMTVlan88 network=192.168.88.0
add address=192.168.20.1/25 interface=LAN_20_PF network=192.168.20.0
/ip dhcp-client
add comment=defconf interface=ether2-WAN_Darnet
/ip dhcp-server lease
...
...
...
/ip dhcp-server network
add address=192.168.10.0/24 boot-file-name=pxelinux.0 dns-server=192.168.10.1 gateway=192.168.10.1 next-server=192.168.10.97
add address=192.168.20.0/25 gateway=192.168.20.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip dns static
/ip firewall address-list
add address=66.254.114.239 list=block_IPS
add address=66.254.114.41 list=block_IPS
add address=185.88.181.3 list=block_IPS
/ip firewall filter
add action=fasttrack-connection chain=forward connection-state=established,related hw-offload=yes
add action=accept chain=input protocol=icmp
add action=drop chain=input comment="Drop Invalid Input" connection-state=invalid,new in-interface-list=WAN
add action=accept chain=input src-address=192.168.0.0/16
add action=accept chain=input comment="defconf: accept established,related" connection-state=established,related
add action=accept chain=input comment="defconf: accept established,related" connection-state=established,related
add action=drop chain=input comment="Drop All other"
add action=accept chain=forward comment="defconf: accept established,related" connection-state=established,related
add action=drop chain=forward comment="Drop Invalid Forward" connection-state=invalid
add action=drop chain=forward dst-address-list=block_IPS dst-port=1-60000 log=yes log-prefix="bloked ip attempt" protocol=tcp src-address=192.168.10.0/24
add action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m chain=forward comment="Stage 1: Track SSH Attempts" connection-state=new dst-port=55523 protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=1d chain=forward comment="Stage 2: Add to Blacklist after second attempt" connection-state=new dst-port=55523 protocol=tcp src-address-list=ssh_stage2
add action=drop chain=input comment="Drop SSH Blacklist" src-address-list=ssh_blacklist
add action=drop chain=input in-interface=ether2-WAN_Darnet
add action=drop chain=input in-interface=ether4-WAN_Rybnet
add action=reject chain=forward connection-mark=other out-interface=ether2-WAN_Darnet reject-with=icmp-network-unreachable
add action=reject chain=forward connection-mark=first out-interface=ether4-WAN_Rybnet reject-with=icmp-network-unreachable
add action=drop chain=forward dst-port=111 protocol=tcp
add action=drop chain=forward dst-port=135 protocol=tcp
add action=drop chain=forward dst-port=137-139 protocol=tcp
add action=drop chain=forward dst-port=445 protocol=tcp
add action=drop chain=forward dst-port=2049 protocol=tcp
add action=drop chain=forward dst-port=12345-12346 protocol=tcp
add action=drop chain=forward dst-port=20034 protocol=tcp
add action=drop chain=forward dst-port=31337 protocol=tcp
add action=accept chain=forward comment=ICMP icmp-options=0:0 protocol=icmp
add action=accept chain=forward icmp-options=3:0 protocol=icmp
add action=accept chain=forward icmp-options=3:1 protocol=icmp
add action=accept chain=forward icmp-options=4:0 protocol=icmp
add action=accept chain=forward icmp-options=8:0 protocol=icmp
add action=accept chain=forward icmp-options=11:0 protocol=icmp
add action=accept chain=forward icmp-options=12:0 protocol=icmp
/ip firewall mangle
add action=mark-connection chain=output connection-mark=no-mark connection-state=new new-connection-mark=WAN1_con_mark out-interface=ether2-WAN_Darnet
add action=mark-routing chain=output connection-mark=WAN1_con_mark new-routing-mark=to_WAN_Darnet out-interface=ether2-WAN_Darnet
add action=mark-connection chain=output connection-mark=no-mark connection-state=new new-connection-mark=WAN2_con_mark out-interface=ether4-WAN_Rybnet
add action=mark-routing chain=output connection-mark=WAN2_con_mark new-routing-mark=to_WAN_Rybnet out-interface=ether4-WAN_Rybnet
add action=mark-connection chain=forward connection-mark=no-mark new-connection-mark=first out-interface=ether2-WAN_Darnet passthrough=yes
add action=mark-connection chain=forward connection-mark=no-mark new-connection-mark=other out-interface=ether4-WAN_Rybnet passthrough=yes
/ip firewall nat
add action=dst-nat chain=dstnat comment=touter disabled=yes dst-port=80 in-interface=ether2-WAN_Darnet log=yes protocol=tcp to-addresses=192.168.10.3 to-ports=80
add action=masquerade chain=srcnat out-interface=ether2-WAN_Darnet src-address=192.168.10.0/24
add action=masquerade chain=srcnat out-interface=ether2-WAN_Darnet src-address=192.168.20.0/24
add action=masquerade chain=srcnat out-interface=ether2-WAN_Darnet src-address=10.0.5.0/30
add action=masquerade chain=srcnat out-interface=ether4-WAN_Rybnet src-address=192.168.10.0/24
add action=masquerade chain=srcnat out-interface=ether4-WAN_Rybnet src-address=192.168.20.0/24
add action=dst-nat chain=dstnat comment="Port 8000 " disabled=yes dst-port=38123 in-interface=ether2-WAN_Darnet protocol=tcp to-addresses=192.168.10.150 to-ports=8000
add action=dst-nat chain=dstnat comment="Port 8001 " disabled=yes dst-port=38124 in-interface=ether2-WAN_Darnet protocol=tcp to-addresses=192.168.10.151 to-ports=8000
/ip firewall service-port
set ftp disabled=yes
/ip route
add dst-address=8.8.8.8 gateway=myGlobalIP_GW scope=10
add dst-address=8.8.4.4 gateway=10.0.5.1 scope=10
add check-gateway=ping distance=1 gateway=8.8.8.8 routing-table=to_WAN_Darnet target-scope=11
add check-gateway=ping distance=2 gateway=8.8.4.4 routing-table=to_WAN_Darnet target-scope=11
add check-gateway=ping distance=1 gateway=8.8.4.4 routing-table=to_WAN_Rybnet target-scope=11
add check-gateway=ping distance=2 gateway=8.8.8.8 routing-table=to_WAN_Rybnet target-scope=11
add check-gateway=ping distance=1 gateway=myGlobalIP_GW
add distance=2 gateway=10.0.5.1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes