First thing I would try would be to remove the entries from firewall-start, reboot, then try to enter the commands manually via telnet/ssh to check there are no error messages (all except the 'if' statement, that's just a safeguard to prevent it running when it's already loaded).
Thanks John. This is helpful troubleshooting tips. Anyway I found the problem, it could be a bug with the Switch options page.
There are 3 options : Jumbo Frames, Spanning Tree and NAT Acceleration. My jumbo frames was off while the STP and NAT are on. If I simply turn NAT off, after I go back to the same page, it still shows that NAT is off. Tried it a few more times, still the same. If I turn off STP and NAT, then apply, going to that page shows all 3 are off. Then I turned STP back on. Webmon is now working. As someone has said, it'd be great for some sort of script to filter off all the unique sites and perhaps even look up against a known Malicious sites or Web Reputation database to generate the info which then gets saved as a file or emailed out. I have some ideas on this but don't have the time to refresh all my unix scripting skills. If someone is interested to do this, I am open to discuss some of my ideas on making something useful out of it.
Originally :
cat /proc/webmon_recent_domains |wc -l
749
cat /proc/webmon_recent_domains |cut -c 26- |sort |uniq |wc -l
575
The above only drills down to the uniq domains that has been monitored, these can then be piped to a reputation/malicious site checker.
I think this might be useful to those who are concerned about what sites the devices on their networks are connecting to.
For those who are using Gmail, the below script snippet can mail it out (for safe practice, setup a separate email address for sending this out instead of your regular gmail account in case your router got hacked and steals your script) :
FROM="your_gmail_address here"
AUTH="your_gmail_sender_id_here"
PASS="GMAIL_PASSWORD_HERE"
FROMNAME="Happy Router"
TO="gmail_recipient_here"
echo "Subject: SOME_SUBJECT" >/tmp/mail.txt
echo "From: "$FROMNAME"<$FROM>" >>/tmp/mail.txt
echo "Date: `date -R`" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "Whatever_static_email_body_here" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "My WAN IP is: `nvram get wan0_ipaddr`" >>/tmp/mail.txt
echo "Uptime is: `uptime | cut -d ',' -f1 | sed 's/^.\{12\}//g'`" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "---- " >>/tmp/mail.txt
echo "Your Router." >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
cat /tmp/mail.txt | sendmail -H"exec openssl s_client -quiet \
-CAfile /jffs/configs/Equifax_Secure_Certificate_Authority.pem \
-connect smtp.gmail.com:587 -tls1 -starttls smtp" \
-f"$FROM" \
-au"$AUTH" -ap"$PASS" $TO
rm /tmp/mail.txt