Hi,
I’m new with MikroTik and have a problem with NAT / Routing
My configuration is:
/interface bridge
add name=bridge fast-forward=no
/interface vlan
add interface=bridge vlan-id=12 name=VLAN2
add interface=bridge vlan-id=14 name=VLAN4
/interface bridge port
add bridge=bridge interface=ether1 pvid=12 hw=yes frame-types=admit-all
add bridge=bridge interface=ether2 pvid=12 hw=yes frame-types=admit-all
add bridge=bridge interface=ether3 pvid=12 hw=yes frame-types=admit-all
add bridge=bridge interface=ether11 pvid=14 hw=yes frame-types=admit-all
add bridge=bridge interface=ether12 pvid=14 hw=yes frame-types=admit-all
add bridge=bridge interface=ether24 pvid=14 hw=yes frame-types=admit-all
/ip address
add address=192.168.12.240/24 interface=VLAN2
add address=192.168.14.240/24 interface=VLAN4
/interface bridge vlan
add bridge=bridge vlan-ids=12 tagged="bridge,ether1,ether2" untagged="ether3"
add bridge=bridge vlan-ids=14 tagged="bridge,ether12" untagged="ether11,ether24"
/interface bridge
set bridge vlan-filtering=yes protocol-mode=mstp
The input on port 11 are upd broadcast messages from a component with the ip 192.168.14.41
At the moment I see this broadcast messages and every thing else from this subnet on port 24
Now I want to have port 24 only as a output port to see only the boradcast messages.
And I want that this boradcast messages have the src ip 192.168.19.41.
If i add only
/ip firewall nat
add chain=srcnat src-address=192.168.14.41 action=src-nat to-addresses=192.168.19.41
it is not working.
I tried
/ip firewall mangle
add chain=prerouting action=mark-packet new-packet-mark=output_packages protocol=udp src-address=192.168.14.41 dst-address=255.255.255.255
and
/ip firewall nat
add chain=input packet-mark=output_packages action=src-nat to-addresses=192.168.19.41
and
/ip firewall filter
add chain=forward action=accept packet-mark=output_packages out-interface=ether24
but nothing works.
I also tried:
/interface bridge
add name=bridge fast-forward=no
/interface vlan
add interface=bridge vlan-id=12 name=VLAN2
add interface=bridge vlan-id=14 name=VLAN4
/interface bridge port
add bridge=bridge interface=ether1 pvid=12 hw=yes frame-types=admit-all
add bridge=bridge interface=ether2 pvid=12 hw=yes frame-types=admit-all
add bridge=bridge interface=ether3 pvid=12 hw=yes frame-types=admit-all
add bridge=bridge interface=ether11 pvid=14 hw=yes frame-types=admit-all
add bridge=bridge interface=ether12 pvid=14 hw=yes frame-types=admit-all
/ip address
add address=192.168.12.240/24 interface=VLAN2
add address=192.168.14.240/24 interface=VLAN4
add address=192.168.19.240/24 interface=ether24
/interface bridge vlan
add bridge=bridge vlan-ids=12 tagged="bridge,ether1,ether2" untagged="ether3"
add bridge=bridge vlan-ids=14 tagged="bridge,ether12" untagged="ether11"
/interface bridge
set bridge vlan-filtering=yes protocol-mode=mstp
/interface list
add name=Output
/interface list member
add interface=ether24 list=Output
/ip firewall filter
add action=accept chain=forward connection-state=established,related
/ip firewall nat
add chain=srcnat src-address=192.168.14.41 action=src-nat to-addresses=192.168.19.41
/ip route
add dst-address=192.168.14.0/24 gateway 192.168.19.240 routing-table=main
But with this configuration, I don’t even see the original broadcasts.
Can you explain me, what I make wrong and how I can output all incomming broadcast upd packages from the ip 192.168.14.41 to port eter24 and change the source ip to 192.168.19.41?
Thank you very much.


