Flush cache and firewall rules rt3200

hello I would like to empty the cached thanks to crontab on my router I use this command which works very well

I then use 4 traffic rules in luci for my games only as and when in firewall these rules are filled in Mb I would like to be able to reset them approximately every 4 hours is this possible thank you

I use this for the cache but no idea to restart the traffic rules only the 4 rules

@dlakelan @moeller0 @segal_72

0 */8 * * * sync | echo 3 > /proc/sys/vm/drop_caches every 8hour

i would like flush this rules every 4hours

config rule
	option family 'ipv4'
	option target 'DSCP'
	option set_dscp 'CS4'
	list dest_ip '192.168.2.160'
	list proto 'udp'
	option dest_port '3074'
	option src '*'
	option dest 'lan'
	option name 'DOPAM-IT-DEST-UDP'

config rule
	list proto 'udp'
	list src_ip '192.168.2.160'
	option src_port '3074'
	option target 'DSCP'
	option set_dscp 'CS4'
	option src '*'
	option dest 'lan'
	option name 'DOPAM-IT-SRC-UDP'

config rule
	option target 'DSCP'
	option set_dscp 'CS4'
	option family 'ipv4'
	list proto 'tcp'
	option src_port '3074'
	list dest_ip '192.168.2.160'
	option dest 'lan'
	option src '*'
	option name 'DOPAM-IT-DEST-TCP'

config rule
	list proto 'tcp'
	list src_ip '192.168.2.160'
	option target 'DSCP'
	option set_dscp 'CS4'
	option dest_port '3074'
	option src '*'
	option dest 'lan'
	option name 'DOPAM-IT-SRC-TCP'






thanks

This can be useful for debugging things but in general it's not a good idea. Cache is basically harmless, and will be dropped by the kernel on demand. Forcing it to drop can reduce performance but most routers don't do much filesystem reading anyway.

2 Likes

What does this mean, exactly?

it's for my video game it's empy now because my game is off but normally is begin

look





config rule
	option family 'ipv4'
	option target 'DSCP'
	option set_dscp 'CS4'
	list dest_ip '192.168.2.160'
	option name 'udpGAMEVISIO'
	list proto 'udp'
	option dest_port '3074'
	option src '*'
	option dest 'lan'

config rule
	option name 'udpgamevisio2'
	list proto 'udp'
	list src_ip '192.168.2.160'
	option src_port '3074'
	option target 'DSCP'
	option set_dscp 'CS4'
	option family 'ipv4'
	option src 'lan'
	option dest '*'

config rule
	option target 'DSCP'
	option set_dscp 'CS4'
	option family 'ipv4'
	option name 'tcpGAMEVISIO'
	list proto 'tcp'
	option src_port '3074'
	list dest_ip '192.168.2.160'
	option dest 'lan'
	option src '*'

config rule
	option name 'tcpgamevisio2'
	list proto 'tcp'
	list src_ip '192.168.2.160'
	option target 'DSCP'
	option set_dscp 'CS4'
	option dest_port '3074'
	option family 'ipv4'
	option src 'lan'
	option dest '*'

Are you trying to reset the counters so you can see how much traffic the rules have?

yes dlakelan if I can reset the counter every 4 hours that would be great

in the image we see 0 in DSCP prerouting and postrtouing because my game console is not turned on

I don't know if it's a placebo effect but these rules seem to make my gameplay faster for call of duty

could you just do

/etc/init.d/firewall restart

from cron?

1 Like

yes but every minute for example for see ? if i restart firewall my game bug in party

i have also test but the chain appair in double

like this

*/5 * * * * /etc/init.d/firewall restart