Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Scheduled filtering by MAC address
« previous
next »
Print
Pages: [
1
]
Author
Topic: Scheduled filtering by MAC address (Read 1452 times)
bitTwiddler
Newbie
Posts: 28
Karma: 0
Scheduled filtering by MAC address
«
on:
March 01, 2023, 02:25:22 am »
Hello OPNsense gurus,
I would like to block internet access by MAC id during specific periods of the day (during testing and quizzes). Is there a way to do that from the UI or the command line? The latter would allow me to use cron to schedule the outages, the former would be fine as well.
Thanks!
Logged
chemlud
Hero Member
Posts: 2483
Karma: 112
Re: Scheduled filtering by MAC address
«
Reply #1 on:
March 01, 2023, 08:36:07 am »
You can have scheduled allow rules, to be on the safe side I would add a cron job for killing all states 1 min after the block kicks in.
Hope your setup is MAC spoofing-proof... ;-)
The easiest way: pull the power plug of the access point.
Logged
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare
felix eichhorns premium katzenfutter mit der extraportion energie
A router is not a switch - A router is not a switch - A router is not a switch - A rou....
bitTwiddler
Newbie
Posts: 28
Karma: 0
Re: Scheduled filtering by MAC address
«
Reply #2 on:
March 01, 2023, 09:07:08 pm »
I am not concerned with MAC spoofing at this point. Good point on killing states. Is that something that can be done with OPNsense using the command line or are you speaking of killing open network connections using Linux commands?
> The easiest way: pull the power plug of the access point.
Pulling the plug would mean no computer usage which is not at all the point.
I was hoping that I could enable/disable firewall rules using an API as that would be slick and easy to encorporate into cron.
Logged
bitTwiddler
Newbie
Posts: 28
Karma: 0
Re: Scheduled filtering by MAC address
«
Reply #3 on:
March 01, 2023, 11:13:40 pm »
Digging further into the docs there _are_ API endpoints for the firewall.
https://docs.opnsense.org/development/api/core/firewall.html
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Scheduled filtering by MAC address