Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
20.1 Legacy Series
»
Remotely enable / disable a rule
« previous
next »
Print
Pages: [
1
]
Author
Topic: Remotely enable / disable a rule (Read 1954 times)
Ulrar
Newbie
Posts: 16
Karma: 3
Remotely enable / disable a rule
«
on:
May 10, 2020, 05:35:58 pm »
Hi,
Is there any way, either through API or SSH or anything else, to have an external system enable or disable an existing firewall rule ?
I have a rule to send my TV's traffic through a VPN (for geo locked content) and I'd like to be able to quickly toggle it on or off from home assistant, I was thinking of just writing a script but it looks like the API doesn't expose anything outside of aliases for the firewall.
Is there any other way to get it to work ?
Thank you
Logged
MrB
Newbie
Posts: 35
Karma: 3
Re: Remotely enable / disable a rule
«
Reply #1 on:
May 10, 2020, 07:08:34 pm »
Haven't played with it myself, but looks like there's a os-firewall plugin "Firewall API supplemental package" and looking at the docs (
https://docs.opnsense.org/development/api/plugins/firewall.html
) it seems that there's a command for toggling a rule.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
20.1 Legacy Series
»
Remotely enable / disable a rule