Community discussions

MikroTik App
 
palii
just joined
Topic Author
Posts: 23
Joined: Sun Nov 19, 2017 6:57 pm

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

Mon Sep 30, 2019 10:01 pm

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
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11598
Joined: Thu Mar 03, 2016 10:23 pm

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

Thu Oct 03, 2019 3:28 pm

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.
 
palii
just joined
Topic Author
Posts: 23
Joined: Sun Nov 19, 2017 6:57 pm

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

Fri Oct 04, 2019 12:37 am

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.

Who is online

Users browsing this forum: Huy0880 and 133 guests