We use industrial printers with IP of 192.168.1.1. As it is replaced by maintenenace all printers has a Mikrotik device with DST-NAT so they are always availabe on the right LAN IP (in 24/7 maintenance not set IP at all )
In one packiging machine we have two printers so it would be great to use one Mikrotik device for both printers. As both printers have the same IP addresses I did not not find a solution to create two DST nat rule as in the DNS-nat rule it is not possible to define the out going interface.
This is the current settings for a printer
Code: Select all
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=10.36.6.209 dst-port=20000 in-interface=1-WAN protocol=tcp to-addresses=192.168.1.1 to-ports=20000
add action=masquerade chain=srcnat dst-address=192.168.1.1 out-interface=2-printer protocol=tcp
Code: Select all
/ip address
add address=10.36.6.209/23 interface=1-WAN network=10.36.6.0
add address=10.36.6.210/23 interface=1-WAN network=10.36.6.0
add address=192.168.1.254/24 interface=2-53mm network=192.168.1.0
add address=192.168.1.253/24 interface=3-128mm network=192.168.1.0
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=10.36.6.209 dst-port=20000 in-interface=1-WAN protocol=tcp src-address=10.36.0.0/19 to-addresses=192.168.1.1 to-ports=20000
add action=dst-nat chain=dstnat dst-address=10.36.6.210 dst-port=20000 in-interface=1-WAN protocol=tcp src-address=10.36.0.0/19 to-addresses=192.168.1.1 to-ports=20000
add action=accept chain=srcnat dst-address=192.168.1.1 out-interface=2-53mm protocol=tcp
add action=accept chain=srcnat dst-address=192.168.1.1 out-interface=3-128mm protocol=tcp