Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Webfeger

#1
26.7 Series / Re: API reauest toggleRule failed
September 18, 2026, 09:00:58 PM
Sometimes you can't see the forest for the trees. It only just occurred to me that an error had crept into the URL.. the script is working without the getRule param..
#2
26.7 Series / API reauest toggleRule failed
September 18, 2026, 07:28:59 PM
Hi there,

i try to toggle fw rules by pusing api request in powershell. I already tried to check out different sites but i can't find the reason, why this request failed:

# api key
$key = 'hidden'
# api secret
$secret = 'hidden too' 
# url
$url = 'https://192.168.1.1:4444' 
# ------------------

# create basic auth info
$authinfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $key,$secret))) 
Invoke-RestMethod -Uri "$url/api/firewall/filter/toggleRule/getRule/d4649c5b-8e6c-4768-88fd-6f39a28e0a05/0" -Method Post -Headers @{Authorization = "Basic $authinfo"} 

Output:
result
------
failed


Any ideas?
I already checked out that the UUID is correct by using backup xml
#3
General Discussion / Re: dsnmasq dhcp-script
January 18, 2026, 01:59:42 PM
Quote from: Patrick M. Hausen on January 18, 2026, 12:23:21 PMPut this in the first line of /home/dhcp_lease.pl

#!/usr/local/bin/perl

and make the script file executable (chmod 755). The use only the script path in the configuration.

Thanks for help !! must have overseen that because there was already define, but wrong path. Now the script is working so far and monin is ready. Will take some tests.
#4
General Discussion / Re: dsnmasq dhcp-script
January 18, 2026, 12:02:02 PM
I Did found the config file and wrote a script wich will post the results into a logfile.

Sadly i didn't figured out how i can make dnsmasq able to run perl. Thats my current result in dnsmasq logfile:

failed to execute /usr/local/bin/perl /home/dhcp_lease.pl: No such file or directory
#5
General Discussion / dsnmasq dhcp-script
January 18, 2026, 10:39:48 AM
Hey there,

I want to monitor new dhcp leases with dynamic mappings.
I figured out that dnsmasq will start a script after new lease by using param "dhcp-script" in dhcp config file.
I didn't find a option to set this param on web gui. so where the config file of dnsmasq is place which i can use to add this param?

My plan is to write a script which will check the result against the dnsmasq host file and put the result ina logfile for monit

I'm using OPNsense since this weekend and i still have to figure out how i can optimize the monitoring.

Best regards
Webfeger