Microtik 0 trust port base somthing like "APN isolation for rj45"

Got 4 microtik sfp+ router what i try to accomplish is 0 trust on RJ45. Somehow i manage to make it work but only between ports is blocking connection. I am not a networking guy know what i should know but more like full stack dev.

Lets say i have 300 devices and what i try to accomplish to block ports: 22 139 to each user i don't care about performance security is more important.

On hyper-v isolation some turtoial say create own router but i have microtik why i need to create virtualization router.

What i do on first router: drop - forward on ports (that works between ports)

Second approach was use different network like .33 and .22 but then realize on production that dosnt work on same port.

I was try to use Mangle on prerouting src address .33 or .22 was new connection mark but that was still fail but use it for bandwidth limit.

so is there any way to do it as it is requirement for me for government contract

Maybe something VLAN devices just need have access to internet and from few IP outside router somebody have to connect sometimes

Where are these ports located at? Routers? Do you want to block traffic to these ports on routers or usur to user one?

Just got many mikrotik routers to block traffic between

(router 1)
CRS309-1G-8S+IN
port 1 hyperv
port 2 hyperv
port 3 esxi

(router 2)
CRS326-24G-S2+
port 1 (30 devices)
port 2 (100 devices) 10mbps/max device
port 2 (50 devices) 10mbps/max device
...

one one router was trying use two network one for manage 192.168.33.0 one for devices 192.168.22.0 but that was only of my approach to block this some ports. no vlan

Wish to block traffic between users:
Lets say User3 get compromised open adobe PDF computer get compromised. Let call him "haxor" try to scan network - can't access to different devices on different router as its blocking it by firewall. Then he try scan same network found some ssh and do brute force found some samba port found microtik manage port check for outdated version.

Frankly speaking I do not understand your language

You should remeber that all devices that are connected at the L2 level do communicate directly with no router's actions taken.
On the other hand, how do you know that traffic from, let's say, computer A to port 139 of device B is the compromised traffic? What is the difference of traffic "norma" vs "compromised" connection when A asks B for login to get an access? How do you want to classfy/differentiate it?
Assuming that all trafic goes via router, when and how the router decides "it's the compromised traffic"?

It's time someone got hired.
I can't understand what you're writing, and if your ideas are as confusing as your writing,
well, you'd better hire a consultant who knows what they're doing.

Perhaps post the configuration, since there is some ambiguity on how the IP addresses/ports[/bridge] are configured.

But in theory you should just need a /ip/firewall/filter to drop the desired src-address/src-port etc. Now if all this is flowing through a bridge (and you're just multihoming the IP address on the bridge), you could use the bridge filters to drop traffic since traffic may not be going through the firewall – thus some config :export help.

Instructions if needed:

Also a simple schematics of your intended network setup would help understanding the issues and possible solutions.

If you want to get help in the right direction follow the simple steps!!

  1. Draw a detailed network diagram ( ISP, vlans between devices etc.)

  2. Post your config for all MT devices.
    /export file=anynameyouwish ( minus router serial number, any public WANIP information, keys, dhcp lease lists

  3. Describe the requirements (not solutions) in the following manner:
    a. Identify all the user(s)/device(s) including you, the admin.
    b. Identify/Describe all the traffic needs of those indentified in a.

Ensure you describe any servers being used, and how they are accessed (internally, externally)
Ensure you describe any services being used on the Router ( VPN etc )
Ensure you describe in detail if you are using more than one ISP (multi-wan_
-primary/failover
-load balancing
-incoming only on one ISP
-outgoing dedicated to one WAN

Please make the effort to do the above.
If not willing or able then,
https://mikrotik.com/consultants

You should remeber that all devices that are connected at the L2 level do communicate directly with no router's actions taken.

I think this is final answer i read in different topic on mikrotik forum about this issue.

Guys i run tomato router for 8 years without issue
Just mikrotik is super powerfull so for years i was not do any changes simple rule "If is work don't touch"

Was thinking to use MAC-Based VLANs but i see its port base

https://www.youtube.com/watch?v=b2cJF0ODpPA

So final solution is just add more firewall rules on each device

Dont care about solutions, they are useless without knowing the requirements.

Have you considered Dot1X, and then configure the client devices to use 802.1X? But all devices need to be on MikroTik ports controlled by Dot1X. See: Dot1X - RouterOS - MikroTik Documentation

Anyway, since no one knows the topology of the devices nor your desired scheme either, it's a bit hard to help.

Sigh,,,,,,,,,,,,,,, ammo dont play the solutions without requirements game.............. ;-PPPPPPP

I think i was not clear why my question:
firewall between ports work great just on same port devices there is a wild west west.

lets say on port 3 i got hyper-v and on port 4 i got esxi and when scan network from port 3 with nmpa i can see all ssh 22 port open on port 3 but not on port 4 as is blocked by firewall.

Dot1X interesting but for me too complicated

but now i am puzzled how mikrocata2selks works when we cant block port on same port

Is a simple firewall that works green, yellow, blue are rules to block access to other microtik devices

Extra config:

  1. use firewall in bridge "settings"
  2. hw=no disabale hardware offload in bridge ports

https://www.youtube.com/watch?v=UsgJFhkHB9g

# 2025-11-10 18:42:32 by RouterOS 7.19.1
# software id = LU8J-120Z
#
# model = CRS326-24G-2S+
# serial number = XXXXXX
/interface bridge
add admin-mac=F4:1E:57:B8:08:4E auto-mac=no comment=defconf name=bridge
/interface ethernet
set [ find default-name=sfp-sfpplus1 ] mac-address=2C:4D:54:1C:B5:29
/interface list
add name=WAN
add name=LAN
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip pool
add name=dhcp ranges=192.168.4.3-192.168.4.254
/ip dhcp-server
add address-pool=dhcp interface=bridge name=dhcp1
/port
set 0 name=serial0
/certificate settings
set builtin-trust-anchors=not-trusted
/interface bridge port
add bridge=bridge comment=defconf interface=ether1
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=ether6
add bridge=bridge comment=defconf interface=ether7
add bridge=bridge comment=defconf interface=ether8
add bridge=bridge comment=defconf interface=ether9
add bridge=bridge comment=defconf interface=ether10
add bridge=bridge comment=defconf interface=ether11
add bridge=bridge comment=defconf interface=ether12
add bridge=bridge comment=defconf interface=ether13
add bridge=bridge comment=defconf interface=ether14
add bridge=bridge comment=defconf interface=ether15
add bridge=bridge comment=defconf interface=ether16
add bridge=bridge comment=defconf interface=ether17
add bridge=bridge comment=defconf interface=ether18
add bridge=bridge comment=defconf interface=ether19
add bridge=bridge comment=defconf interface=ether20
add bridge=bridge comment=defconf interface=ether21
add bridge=bridge comment=defconf interface=ether22
add bridge=bridge comment=defconf interface=ether23
add bridge=bridge comment=defconf interface=ether24
add bridge=bridge comment=defconf disabled=yes interface=sfp-sfpplus1
add bridge=bridge comment="defconf - this is cable for .88" interface=\
    sfp-sfpplus2
/interface list member
add interface=bridge list=LAN
add interface=sfp-sfpplus1 list=WAN
/interface ovpn-server server
add mac-address=FE:3E:5A:1F:4C:96 name=ovpn-server1
/ip address
add address=192.168.4.1/24 interface=bridge network=192.168.4.0
add address=ROUTERIP/29 interface=sfp-sfpplus1 network=ROUTERMASKMAYBE
/ip dhcp-client
add disabled=yes interface=sfp-sfpplus1
/ip dhcp-server lease
add address=192.168.4.176 mac-address=FE:4D:33:F2:E7:59
add address=192.168.4.70 client-id=1:0:15:5d:58:33:17 mac-address=\
    00:15:5D:58:33:17 server=dhcp1
/ip dhcp-server network
add address=192.168.4.0/24 dns-server=192.168.4.1 gateway=192.168.4.1 \
    netmask=24
/ip dns
set allow-remote-requests=yes servers=\
    192.168.4.1,1.1.1.1,1.1.1.1,8.8.4.4
/ip firewall filter
add action=reject chain=input comment="block router ports" dst-port=\
    53,8291,8291,8728,8729 in-interface=sfp-sfpplus1 protocol=tcp \
    reject-with=icmp-network-unreachable
add action=reject chain=input dst-port=67,68,53 in-interface=sfp-sfpplus1 \
    protocol=udp reject-with=icmp-network-unreachable
add action=drop chain=forward comment="DOSNT WORK for Hyper-v" dst-address=\
    192.168.88.100 dst-port=22 protocol=tcp
add action=drop chain=forward comment="BLOCK to Microtik" disabled=yes \
    dst-address=192.168.88.1 dst-port=22,80 protocol=tcp
add action=drop chain=forward dst-address=192.168.55.0/24 src-address=\
    192.168.88.0/24 src-address-list=""
add action=drop chain=forward dst-address=192.168.99.0/24 src-address=\
    192.168.88.0/24 src-address-list=""
add action=drop chain=forward comment="wazuh no no no only monitor" \
    dst-address=192.168.88.20 dst-port=443,80 protocol=tcp src-address=\
    192.168.88.0/24
/ip firewall nat
add action=dst-nat chain=dstnat comment=RDP dst-port=9834 protocol=tcp \
    src-address=MYIP to-addresses=192.168.4.75 to-ports=3389
add action=masquerade chain=srcnat out-interface-list=WAN
/ip firewall service-port
set ftp disabled=yes
/ip service
set ftp disabled=yes
set ssh disabled=yes
set telnet disabled=yes
set www disabled=yes
/system clock
set time-zone-name=Europe/Berlin
/system identity
set name=NXXXX
/system routerboard settings
set enter-setup-on=delete-key
/tool bandwidth-server
set enabled=no

Terminals located on the same network segment and using the same interface are running at Layer 2. Depending on your network topology, communication between them may not need to go through the interface you configured, thus rendering your firewall rules ineffective.

Hi,

Your routers are actually switches. Normally this is a problem as they don't route very fast,
but for this it probably works well.

You can put ACL's into the switch rules table, to drop the traffic you want dropped.

Something like.

/interface ethernet switch rule
add dst-address=192.168.88.0/255.255.255.0 dst-port=22 mac-protocol=ip
new-dst-ports="" protocol=tcp src-address=192.168.88.0/255.255.255.0
switch=switch1

And before these rules, add some allow rules.

Note: new-dst-ports="" means drop.

https://help.mikrotik.com/docs/spaces/ROS/pages/15302988/Switch+Chip+Features#SwitchChipFeatures-RuleTable

Yeah traffic is not going to hit the router firewall, unless it crosses a IP subnet (in which case the traffic is routed). But if IP address are in same subnet, then ARP will resolve it on the VM hypervisor.

A few possible approaches:

  1. Use a IP subnet for each VM client. So you assign each VM guest its own unique subnet, and assign the default route on router. Since each device will have to use routing to get to another device, it will go through the firewall. But you can't use DHCP (or at least you'd need to associate MAC address as static leases. Also, you'll have a bunch of IP subnets configured in a few spots. And, since all hosts are on same bridge, broadcast and L2 remain open... so possible to block ports like SSH but "less secure" than 2 or 3.
  2. On VM host side, wire each VM guest as a port to CHR. On VMWare, you need a vSwitch per device (IDK Hyper-V terms, but also needs similar). And similar to 1, since each need their own IP subnet, although port isolation in bridge). But this forces all L2 and L3 traffic to CHR's firewall
  3. On VM host side, set a unique VLAN per VM guest, and set CHR as a trunk port to vSwitch. Here you'd need a n VLAN matching VM guest network VLAN ID. Also need IP subnets configured like 1.

I like idea keep it simple stupid it is possible as you say but it require little too much complication. As you mention before even with Dot1X

I think like on windows create simple bat file to block bulk access to: IP List with local firewall
on mac i found pf.conf -->> "block drop from any to 192.168.88.XX"

and still between ports firewall work awesome

maybe i juts maybe in future i will create virutal router for hyperv or esxi