Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.7 Legacy Series
»
[SOLVED] API firewall filter rule not blocking
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] API firewall filter rule not blocking (Read 875 times)
charris
Newbie
Posts: 4
Karma: 0
[SOLVED] API firewall filter rule not blocking
«
on:
December 27, 2022, 08:05:54 pm »
Starlink now has data caps. I need to keep my xboxes from downloading games and updates during Peak hours and eating up all my data.
I have configured a scheduled firewall rule to do this, but I need to make it easier for my family to disable the rule when they want to play a game.
I have home assistant and have followed some instructions for using toggling API filters with HomeAssistant (Controlling OPNsense Firewall Rules from HomeAssistant
https://blog.fuzzymistborn.com/opnsense-firewall
). And this is working.
The challenge that remains is my new API Filter rule seem to block the traffic as expected.
In the Filter rule whether I set the source as 'xboxes' or as an IP of an Xbox (10.0.0.60), or as the "network" of an xbox (10.0.0.60/32) it's not blocking traffic.
Here is how the rule is configured:
Enabled: checked
Action: Block
Interface: LAN,WAN
Direction: Out
TCP/IP Version: IPv4
Protocol: any
Source: (as described above)
Destination: any
Gateway: none
What am I doing wrong?
«
Last Edit: December 28, 2022, 03:59:56 am by charris
»
Logged
charris
Newbie
Posts: 4
Karma: 0
Re: API firewall filter rule not blocking
«
Reply #1 on:
December 28, 2022, 03:59:35 am »
I have resolved the issue.
I recreated the rule and accepted most of the defaults. Then tested and my Xboxes couldn't hit the internet.
Comparing the configs, the one thing that is different is I originally specified the Direction as "out", but the default was "in" and that was the fix.
The other good news is that the filter rule does like the alias I was using in the other Firewall rule!
Now, it's super easy for my wife or kids to open Home Assistant on their phone and toggle the firewall rule.
I'm really loving the upgrade from my old TP-Link router to OPNsense!
Logged
Patrick M. Hausen
Hero Member
Posts: 6826
Karma: 573
Re: [SOLVED] API firewall filter rule not blocking
«
Reply #2 on:
December 28, 2022, 09:35:57 am »
In and out are not viewed as home vs. Internet but strictly from the firewall box itself. A packet from home to the Internet is coming IN on the LAN interface.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
22.7 Legacy Series
»
[SOLVED] API firewall filter rule not blocking