What's new

How To Block/Unblock Internet Access For A Single Device/IP via Command Line on AsusWRT?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!


Regular Contributor
Hello. I have an Asus GS-AX3000 and connected to it I have a device that insists upon having an internet connection (don't know why) about every 30 days. If it does not, it simply stops functioning and starts beeping all the time. Otherwise, I have no reason at all to allow this device to have internet access. So using the AsusWRT UI I can block it. But after about 30 days, I have to unblock it (and seemingly restart the firewall as well) in order to make it function and stop its infernal beeping and then block it again after that.

This is all rather a PIA to do manually and if I am not around, the device is useless until I get back and do all of this. So I want to try and do this via the command line on a schedule somehow. I have seen other discussions of this on the web but I have failed to location a really clear solution. I know now that when the device is blocked I can see the following using iptables -L for the device (no such entry exists when the device is unblocked):

DROP all -- anywhere anywhere MAC <<mac address here in ALL CAPS>>

So I am thinking that using iptables somehow I can drop this, restart the firewall, and re-add it. And perhaps I can use cron to schedule this every 29 days.

But I am such a newbie - especially to iptables - I have no idea how to accomplish this. So any help is appreciated greatly. Thanks!
Replacement of the device with one that works as expected is more straightforward.
Then I hope you can get a reply to your coding requests.
Maybe "Parental Controls - Time Scheduling" would address the need?
Thanks for mentioning this. I now realize that when I block a device's internet access via the network map UI, it is doing something with these. I thought them completely separate!

As I look at it, this MIGHT help. The mechanism seems oriented to a weekly schedule and I was hoping for a monthly one. But perhaps I can live with it.

Maybe "Parental Controls - Time Scheduling" would address the need?
Thanks again for suggested using parental controls. I had never looked at it before. It seems that when I block a device's access completely to the internet via the network map UI, it is turning this on AND blacking using that mechanism. I never realized it before because I never looked (foolish me)...

So in looking further, it seems that this mechanism, when time-based, is weekly-oriented, not monthly. At first, I thought this too open as I really want it only once per month. But I think that the convenience factor is important too. So I think I have it locked-up except for the last hour of every Saturday.

Meanwhile, in poking around trying to find a command-line "answer" I discovered in the results of the command

nvram getall

a number of entries starting with MULTIFILTER_ that appear to correspond to the parental controls I have been fiddling with. It seems at least possible that I could alter these values in a script, persist those changes, and then reboot the router to have the changes take effect.

All this seems more effort than it is worth... Thanks!

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!