Yes, just tested it. If you're port forwarding you need this:
iptables -I FORWARD -i eth0 -p tcp -m tcp --dport 8088 -m state --state NEW -j LOG --log-level 1 --log-prefix "WOL "
If you don't specify your WAN interface (-i eth0) your syslog could become flooded with LAN entries.
Put the rule in firewall-start scriptWonderful! This seems to do the trick and now it is showing.
I also change the WOL script to use WOL in the text, just tested and it work perfect!
How can I be sure that this rule is not removed? Every time I add a PORTFWD in the webui it removes this rule again.
Thanks all. I will be creating a FAQ on the page to ensure this is used instead of the other one because logging all ACCEPTED connections make the router use too many resources.
Put the rule in firewall-start script
Did you make the file executable? https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts#creating-scriptsI added the file and put below in it:
iptables -I FORWARD -i eth0 -p tcp -m tcp --dport 8088 -m state --state NEW -j LOG --log-level 1 --log-prefix "WOL "
However, it does not seem to re-add the rule after reboot or change in PORTFWD.
Thanks.
Did you add the mandatory first line?I added the file and put below in it:
iptables -I FORWARD -i eth0 -p tcp -m tcp --dport 8088 -m state --state NEW -j LOG --log-level 1 --log-prefix "WOL "
However, it does not seem to re-add the rule after reboot or change in PORTFWD.
#!/bin/sh
iptables -I FORWARD -i eth0 -p tcp -m tcp --dport 8088 -m state --state NEW -j LOG --log-level 1 --log-prefix "WOL "
Thanks. But it's still not adding on reboot or any changes in PORTFWDDid you add the mandatory first line?
Code:#!/bin/sh iptables -I FORWARD -i eth0 -p tcp -m tcp --dport 8088 -m state --state NEW -j LOG --log-level 1 --log-prefix "WOL "
#!/bin/sh
iptables -I FORWARD -p tcp -m tcp --dport 8088 -m state --state NEW -j LOG --log-prefix "WOL "
I can't recall seeing a message for scripts. AddingWell you got it working which is the main thing.
You might want to check what the setting for new files is in Notepad++ just in case is still at the default which is Windows.
It's possible that the syslog message doesn't appear in Merlin's firmware (I'm using John's). I know there is a difference, but I thought there was something similar.
logger "Running XXX script"
Yep, logged packets is offOut of interest, does this work with Logged packets set to off? If so, I may deploy something similar!
@Uoppi You need to change the script so that it matches "WOL" instead of "ACCEPT".
2 seconds should be fine.BTW, what do you think, would it compromise the RT-AC86U's performance, if the loop interval was reduced from 5 to, say, 2 seconds (in order to initiate WOL quicker)? Would it be worth it just to shave off a few seconds? With its 1.8GHz dual core, I would assume the router would handle it with ease.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!