Page 1 of 1

How to NAT external Wake-On-Lan packet into specific VLAN

Posted: Mon Sep 30, 2019 10:01 pm
by palii
I can't seem to NAT an incoming wake-on-lan packet from the internet to a specific vlan. I'm using routerOS rb750gr3.

As such this NAT rule doesn't work:
add action=dst-nat chain=dstnat dst-port=9 in-interface-list=WAN protocol=udp to-addresses=10.0.1.10 to-ports=9

How can I add a vlan tag to this packet, so that it goes to vlan101?

Packet testing works:
/tool wol interface=VLAN101 mac=XX:XX:XX:XX:XX:XX

Re: How to NAT external Wake-On-Lan packet into specific VLAN

Posted: Thu Oct 03, 2019 3:28 pm
by mkx
WOL packet from internet is a plain UDP packet. Since you're specifying IP address on your dst-nat rule, it's then up to routing engine to select correct L3 interface (probably some vlan interface) which should pipe the packet to correct VLAN.

Packet testing method is entirely different: it uses special L2 (MAC) packet and specifying interface (VLAN101 is L3 interface on your router, it only defines VLAN indirectly via definition of interface VLAN101) is needed because router has no other information to help with out-interface selection.

Re: How to NAT external Wake-On-Lan packet into specific VLAN

Posted: Fri Oct 04, 2019 12:37 am
by palii
Thanks for the reply and information. You made a few things much clearer.

I figured it out finally.

I had to turn the ARP entry into static.