Community discussions

MikroTik App
 
skendric
just joined
Topic Author
Posts: 7
Joined: Fri Mar 25, 2022 9:46 pm

Unable to access Mikrotik in bridge mode

Sun Mar 05, 2023 5:17 pm

So I've changed to Bridge mode; I can still administer the Mikrotik via WinBox, connecting to its MAC address

But I cannot even ping the Bridge's IP address, much less http or ssh to it

I don't believe the Firewall rules apply ... I have added all the Ether ports to the LAN category ... what am I missing?

--sk

# mar/05/2023 07:08:32 by RouterOS 7.6
# software id = xxxx-xxxx
#
# model = RBD53iG-5HacD2HnD
# serial number = xxxx
/interface bridge
add admin-mac=18:FD:74:52:C3:B5 auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=\
MikroTik-52C3B9 wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-onlyac disabled=no distance=indoors \
frequency=auto installation=indoor mode=ap-bridge ssid=Foozle \
wireless-protocol=802.11
/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 ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=dhcp interface=bridge name=defconf
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge interface=ether1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf disabled=yes interface=ether1 list=WAN
add interface=ether2 list=LAN
add interface=ether3 list=LAN
add interface=ether4 list=LAN
add interface=ether5 list=LAN
add interface=wlan2 list=LAN
add interface=wlan1 list=LAN
/ip address
add address=10.0.0.5/16 comment=defconf interface=bridge network=10.0.0.0
/ip dhcp-client
add comment=defconf disabled=yes interface=bridge
/ip dhcp-server network
add address=10.0.0.0/16 comment=defconf dns-server=192.168.88.1 gateway=\
10.0.0.5 netmask=16
/ip dns
set allow-remote-requests=yes servers=10.0.0.1
/ip dns static
add address=10.0.0.5 comment=defconf name=router.lan
/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 disabled=yes
add action=accept chain=input comment="defconf: accept ICMP" 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 hw-offload=yes
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
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
/ip ssh
set always-allow-password-login=yes
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 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 ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
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 packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
/system clock
set time-zone-name=America/Los_Angeles
/system identity
set name=Case
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
 
tdw
Forum Guru
Forum Guru
Posts: 1845
Joined: Sat May 05, 2018 11:55 am

Re: Unable to access Mikrotik in bridge mode

Sun Mar 05, 2023 5:26 pm

If whatever you are connecting from does not have a 10.0.x.x address with subnet mask 255.255.0.0 you will be unable to connect. The subnet mask should match on both devices, if you wish to access from another subnet add a default route specifying a gateway address.
 
skendric
just joined
Topic Author
Posts: 7
Joined: Fri Mar 25, 2022 9:46 pm

Re: Unable to access Mikrotik in bridge mode

Sun Mar 05, 2023 5:36 pm

Yes, I'm connecting from 10.0.0.0/16 hosts
 
2frogs
Forum Veteran
Forum Veteran
Posts: 713
Joined: Fri Dec 03, 2010 1:38 am

Re: Unable to access Mikrotik in bridge mode

Sun Mar 05, 2023 5:56 pm

You have to either disable the drop not from lan firewall rule for input or fix the interface list member for lan to include bridge. The problem is when you use quickset to change to bridge mode, the interface list members get changed from bridge to the individual interfaces. But since the interfaces are slaved to the bridge, the firewall does not see the connection as coming from an individual interface and gets dropped.
 
skendric
just joined
Topic Author
Posts: 7
Joined: Fri Mar 25, 2022 9:46 pm

Re: Unable to access Mikrotik in bridge mode

Sun Mar 05, 2023 6:33 pm

I believe I have disabled the "drop all not coming from LAN" rule:

add action=drop chain=input comment="defconf: drop all not coming from LAN" disabled=yes in-interface-list=!LAN

Ideally, all the LAN interfaces would belong to the same bridge group
[admin@Case] /interface> print
Flags: X, R - RUNNING; S - SLAVE
Columns: NAME, TYPE, ACTUAL-MTU, L2MTU, MAX-L2MTU, MAC-ADDRESS
# NAME TYPE ACTUAL-MTU L2MTU MAX-L2MTU MAC-ADDRESS
0 S ether1 ether 1500 1598 9214 18:FD:74:52:C3:B4
1 RS ether2 ether 1500 1598 9214 18:FD:74:52:C3:B5
2 S ether3 ether 1500 1598 9214 18:FD:74:52:C3:B6
3 S ether4 ether 1500 1598 9214 18:FD:74:52:C3:B7
4 S ether5 ether 1500 1598 9214 18:FD:74:52:C3:B8
5 XS wlan1 wlan 1500 1600 2290 18:FD:74:52:C3:B9
6 RS wlan2 wlan 1500 1600 2290 18:FD:74:52:C3:BA
;;; defconf
7 R bridge bridge 1500 1598 18:FD:74:52:C3:B5
[admin@Case] /interface>

Is that possible?

--sk
 
skendric
just joined
Topic Author
Posts: 7
Joined: Fri Mar 25, 2022 9:46 pm

Re: Unable to access Mikrotik in bridge mode

Sun Mar 05, 2023 7:37 pm

From a pcap taken on my workstation (which is both administering the Mikrotik via WinBox and attempting to ping it), I can see ARP Requests from my workstation, but no ARP Responses. [I can see the MAC-Telnet traffic between the workstation and the Mikrotik, i.e. the WinBox traffic]

Failing to respond to ARPs doesn't smell like a Firewall issue to me -- I believe that this Firewall operates at Layer 3 and above. But then, I don't have another hypothesis to offer

And the box cannot even ping itself:
[admin@Case] /tool> ping
address: 10.0.0.5
SEQ HOST SIZE TTL TIME STATUS
0 10.0.0.5 timeout
1 10.0.0.5 timeout
2 10.0.0.5 timeout
3 127.0.0.1 84 64 130ms306us host unreachable
4 10.0.0.5 timeout
5 10.0.0.5 timeout
6 10.0.0.5 timeout
7 127.0.0.1 84 64 106ms612us host unreachable
8 10.0.0.5 timeout
9 10.0.0.5 timeout
10 10.0.0.5 timeout
11 127.0.0.1 84 64 94ms308us host unreachable
12 10.0.0.5 timeout
sent=13 received=0 packet-loss=100%

[admin@Case] /tool>


Nor does it appear to have assigned a MAC address to its bridge interface
[admin@Case] /ip/arp> print
Flags: D, P - PUBLISHED; C - COMPLETE
Columns: ADDRESS, MAC-ADDRESS, INTERFACE
# ADDRESS MAC-ADDRESS INTERFACE
0 DC 10.0.0.1 AC:71:2E:EC:50:39 bridge
1 D 10.0.0.5 bridge
[admin@Case] /ip/

--sk
 
skendric
just joined
Topic Author
Posts: 7
Joined: Fri Mar 25, 2022 9:46 pm

Re: Unable to access Mikrotik in bridge mode

Sun Mar 05, 2023 10:33 pm

OK, this is what resolved my issue -- assigning the IP address to the bridge interface, rather than to a particular Ethernet interface
[admin@Case] /ip/address> add address=10.0.0.5/16 interface=bridge
[admin@Case] /ip/address> print
Columns: ADDRESS, NETWORK, INTERFACE
# ADDRESS NETWORK INTERFACE
0 10.0.0.5/16 10.0.0.0 bridge
[admin@Case] /ip/address>

The CLI still doesn't display the MAC address of the bridge interface, but at least I can ping it now, and see the MAC address of the (successfully) pinging station
[admin@Case] /ip/arp> print
Flags: D, P - PUBLISHED; C - COMPLETE
Columns: ADDRESS, MAC-ADDRESS, INTERFACE
# ADDRESS MAC-ADDRESS INTERFACE
0 DC 10.0.0.1 AC:71:2E:EC:50:39 bridge
1 D 10.0.0.5 bridge
2 DC 10.0.0.20 70:20:84:0C:E2:77 bridge
[admin@Case] /ip/arp>
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11584
Joined: Thu Mar 03, 2016 10:23 pm

Re: Unable to access Mikrotik in bridge mode

Sun Mar 05, 2023 10:37 pm

/interface list member
add comment=defconf disabled=yes interface=ether1 list=WAN
add interface=ether2 list=LAN
add interface=ether3 list=LAN
add interface=ether4 list=LAN
add interface=ether5 list=LAN
add interface=wlan2 list=LAN
add interface=wlan1 list=LAN

The problem is that interface list is not about (bridge) ports. Your device has currently only single interface and that's bridge (and that's where IP address belongs .. as you already found out).

And the config refers to LAN interface list in different places, two are under mac-server, one is under neighbor discovery, firewall is full of it. So it's expected that things break in various ways ...
 
tdw
Forum Guru
Forum Guru
Posts: 1845
Joined: Sat May 05, 2018 11:55 am

Re: Unable to access Mikrotik in bridge mode

Sun Mar 05, 2023 10:45 pm

OK, this is what resolved my issue -- assigning the IP address to the bridge interface, rather than to a particular Ethernet interface
When did you change that, it is shown being assigned to the bridge in your original post.

The CLI still doesn't display the MAC address of the bridge interface, but at least I can ping it now, and see the MAC address of the (successfully) pinging station
You wouldn't expect ARP to show the address of the hosts own interface.

Who is online

Users browsing this forum: 5h4k4, almdandi, mkx, pe1chl and 61 guests