The independent technical support site for all things networking!


Post a new topicPost a reply Page 1 of 1   [ 6 posts ]
Author Message
 Post subject: LAN filter & cron
PostPosted: Wed Feb 03, 2010 3:46 am 
Novice
Novice

Joined: Tue Oct 21, 2008 12:40 am
Posts: 16
I need to to filter (...disconnect from WAN) my son's PC during the afternoon in order (I hope...) to have him studying, instead of playing with msn.
I would like to find a way to do this automagically (via a cron job), but I can't find a cm_cli command to turn the filter on/off :(
(...I can't disconnect the ppp side, cause I need my pc running).

Here I found some commands, and one of them seems to be interesting ("lanfilter0:settings..."); but I don't know what (and how) I'll need to set...

Any idea would be (really!) appreciated :)
Thank you in advance for your help


Regards


Top
 Profile  
 
 Post subject: Re: LAN filter & cron
PostPosted: Wed Feb 03, 2010 9:02 am 
Development Team Leader
Development Team Leader
User avatar

Joined: Wed Feb 01, 2006 10:22 pm
Posts: 9332
Location: England, the Centre of Africa
Use rshaper and throttle his bandwidth to 125 bytes per sec.

_________________
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.


Top
 Profile  
 
 Post subject: Re: LAN filter & cron
PostPosted: Wed Feb 03, 2010 3:40 pm 
Novice
Novice

Joined: Tue Oct 21, 2008 12:40 am
Posts: 16
Thank you, thechief. But imho... it's not the same thing.

First of all I would need to load the rshaper module, and I would prefere not to (...the router is already running some -heavy- custom applications). Also (maybe) it should be possible for my son to bypass the rshaper, simply changing the IP address... which is a too simple task.

Eventually (...if it's simpler) it would be fine to filter (stop) all traffic to all stations ("Advanced" -> "IP Filters", "LAN IP: Any", "Block All Traffic" checked), since my son's PC is using the 604t as a sort of gateway to the "real" gateway (...and it's the only station doing this in my home network).

So the question is: (how) can I retrieve the command which is launched when I execute such setting...?

Thank you again for your attention

Regards


Top
 Profile  
 
 Post subject: Re: LAN filter & cron
PostPosted: Wed Feb 03, 2010 5:26 pm 
Development Team Leader
Development Team Leader
User avatar

Joined: Wed Feb 01, 2006 10:22 pm
Posts: 9332
Location: England, the Centre of Africa
Piero wrote:
So the question is: (how) can I retrieve the command which is launched when I execute such setting...?
You can't - unless you find a way to snoop into what the core logic is doing.

_________________
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.


Top
 Profile  
 
 Post subject: Re: LAN filter & cron
PostPosted: Wed Feb 03, 2010 7:56 pm 
Novice
Novice

Joined: Tue Oct 21, 2008 12:40 am
Posts: 16
...I did it, just sniffing the traffic generated by the web interface while I was setting the filter, and looking into the frames :mrgreen:

So, the commands are:
Code:
# echo "begin;lan0:flan:settings/0.0.0.0/block=1;end"|cm_cli -l

to block all traffic, and

Code:
# echo "begin;lan0:flan:settings/0.0.0.0/block=0;end"|cm_cli -l

to unblock it.

...Obviously, you must add "logic:command/save;" to the above commands, if you want to permanently save your setting.

It's possible to check the state too (blocked/unblocked), using
Code:
# echo "begin;lan0:flan:settings/0.0.0.0/block;end"|cm_cli -l


that will return 0 (=unblocked) or 1 (=blocked).

Thank you for your help :)

Regards


Top
 Profile  
 
 Post subject: Re: LAN filter & cron
PostPosted: Wed Feb 03, 2010 10:27 pm 
Development Team Leader
Development Team Leader
User avatar

Joined: Wed Feb 01, 2006 10:22 pm
Posts: 9332
Location: England, the Centre of Africa
Excellent! Now we can add more to our cm_cli syntax list :)

_________________
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 6 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB & WordPress     Hosted by Kieran O'Shea     Site Code © 2009 Kieran O'Shea     All site contents © 2009 RouterTech - All rights reserved     Valid HTML     Valid CSS     Graphics by Neo