How to forward UDP Wake-on-Lan port to broadcast IP with IPTABLES?

Posted by Nazgulled on Server Fault See other posts from Server Fault or by Nazgulled
Published on 2010-11-06T22:36:25Z Indexed on 2010/12/27 21:56 UTC
Read the original article Hit count: 408

I'm trying to setup Wake-on-Lan for some of the LAN computers at home and it seems that I need to open a UDP port (7 or 9 being the most common) and forward all requests to the broadcast IP, which in my case is 192.168.1.255.

The problem is that my router does not allow me to forward anything to the broadcast IP.

I can connect to my router through telnet and it seems this router uses IPTABLES, but I don't know much about it or how to is.

Can someone help me out with the proper iptables commands to do what I want? Also, in case it doesn't work, the commands to put everything back would be nice too.

One last thing, rebooting the router will keep those manually added iptables entries or I would need to run them every time?

© Server Fault or respective owner

Related posts about iptables

Related posts about router