Unifi network connect with mikrotik

Please some one help me . I am using unifi network and unifi hotspot also . I have one problem i want to connect mikrotik with this network because i want to apply this rule

/ip firewall mangle
add chain=postrouting action=change-ttl new-ttl=set:1 out-interface=all vlan
If i make mikrotik as aa switch its is possible to work this rule

???

It is possible if RB is configured to bridge (via software bridge) ports … as opposed to switch (via switch chip). In this case you can apply firewall rules to all passing traffic. Beware that all firewall rules will be consulted for all traffic, potentially this might slow down traffic considerably.

Here are the necessary steps:

  1. configure /interface bridge, specially /interface bridge port. Make sure that /interface ethernet switch has no configuration.
  2. verify that port-to-port traffic is flowing
  3. configure firewall rules
  4. configure bridge to use firewall:
/interface bridge settings
set use-ip-firewall=yes

Beware that the above setting will apply to all bridges on the device (if there are more than one).
5. force all traffic over bridge to pass CPU .. in other words, switch off HW offload:

/interface bridge port
set [ find bridge=<name of bridge here>] hw=no

On top of what @mkx wrote: as we talk about bridging here, matching on out-interface=all-vlan may not work if you have a single bridge with many VLANs on it because in such case the frames being bridged are not handled by Mikrotik’s /interface vlan, so you may have to use out-bridge-port=etherX (where etherX is the to which the Unifi AP is connected) instead.

And from another perspective, the user who wants to distribute your connectivity further may be as clever as you and fix what you’ve broken on his AP connected as a client to your AP, so you may do this whole exercise just to find yourself back where you were before in a couple of hours.

I do this same but i dont know internet is stop working if i chnage he ttl= 1 . Please some one help me in coming my system with TeamViewer or anydisk please . Because every munth my business is going to lost