Firewall rules definition file
-
Where are stored firewall rules? I will change these rules with cron scripts to allow/disallow p2p overnight.
Regards,
Robert
-
config.xml
-
you might want to have a look at this from the m0n0 wiki http://wiki.m0n0.ch/wikka.php?wakka=PoorMansTimeBasedRules and do something similiar to this. however this is somehow "dirty" ;)
-
you might want to have a look at this from the m0n0 wiki http://wiki.m0n0.ch/wikka.php?wakka=PoorMansTimeBasedRules and do something similiar to this. however this is somehow "dirty" ;)
Ouch! "dirty"? That hurts! :(
the choice was to either "do nothing" or "solve the problem" when my client required a time-based rules solution and I didn't want to move away from m0n0wall and the WRAP it was recently installed on.
I know this is the wrong forum for m0n0wall discussions, but I would appreciate comments/suggestions. I realize that my solution is pretty "unorthodox" - but "dirty?"
At least I advocated HTTPS and protecting the script and .wgetrc file.
heh :)
–
Bill Arlofski
mtnbkr on #m0n0wall on Freenode irc -
Sorry, I really didn't want to say your work sucks but you also called it "poor man's timebased rules". Maybe "dirty" wasn't the right word for this, it's just not integrated and might be a bit complicated for the novice user. I apologize for that :'(
-
Here are my parental control rules, maybe this will help get you started.
/root/parental:
#!/bin/sh
/bin/date >> /root/parental.out
case $1 in
goodnight) echo "blocking children";
/sbin/kldload ipfw ;
/sbin/ipfw add 5 deny tcp from 192.168.1.202 to any;
/sbin/ipfw add 5 deny tcp from 192.168.1.205 to any;;goodmorning) echo "allowing children";
/sbin/kldunload ipfw ;;*) echo "nothing to do";;
esac
exit 0crontab:
home brew parental control
59 20 * * 0-4 /root/parental goodnight >> /root/parental.out
59 23 * * 5-6 /root/parental goodnight >> /root/parental.out
59 5 * * * /root/parental goodmorning >> /root/parental.outJust for clarification:
- the PF rules that you setup in the web gui take priority before the ipfw rules.
- this example will not coexist with the captive portal without modification, which I do not use anyway.