I am facing the same issue after upgrading to latest patch OPNsense 26.1.10-amd64.
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
root@OPNsense:~ # df -h
Filesystem Size Used Avail Capacity Mounted on
zroot/ROOT/default 440G 3.1G 436G 1% /
devfs 1.0K 0B 1.0K 0% /dev
/dev/gpt/efiboot0 260M 1.3M 259M 1% /boot/efi
zroot/tmp 436G 5.1M 436G 0% /tmp
zroot/home 436G 384K 436G 0% /home
zroot/var/tmp 436G 688K 436G 0% /var/tmp
zroot 436G 384K 436G 0% /zroot
zroot/usr/src 436G 384K 436G 0% /usr/src
zroot/var/audit 436G 384K 436G 0% /var/audit
zroot/var/crash 436G 384K 436G 0% /var/crash
zroot/var/log 436G 1.9M 436G 0% /var/log
zroot/usr/ports 436G 384K 436G 0% /usr/ports
zroot/var/mail 436G 512K 436G 0% /var/mail
tmpfs 4.0G 4.0G 0B 100% /var/log
devfs 1.0K 0B 1.0K 0% /var/dhcpd/dev
devfs 1.0K 0B 1.0K 0% /var/unbound/dev
/usr/local/lib/python3.11 440G 3.1G 436G 1% /var/unbound/usr/local/lib/python3.11
/lib 440G 3.1G 436G 1% /var/unbound/libroot@OPNsense:/var/log/filter # ls -la
total 4007690
drwx------ 2 root wheel 192 Oct 12 11:01 .
drwxr-xr-x 18 root wheel 2432 Oct 18 03:01 ..
-rw------- 1 root wheel 1649451749 Oct 11 00:00 filter_20251010.log
-rw------- 1 root wheel 1866379578 Oct 12 00:00 filter_20251011.log
-rw------- 1 root wheel 588033927 Oct 18 04:56 filter_20251012.log
import json
import uuid
import csv
with open('opnsense_aliases.json') as user_file:
parsed_json = json.load(user_file)
cur_items=parsed_json['aliases']['alias']
with open('/tmp/pfsense_alias.csv', newline='') as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
#print(row)
item_name = row['name']
item_data = row['data']
item_type = row['type']
item_description = row['description']
if len(row['data'].split(" "))>1:
item_data = "\n".join(row['data'].split(" "))
item_uuid = str(uuid.uuid4())
y = {'enabled': '1',
'name': item_name,
'type': item_type,
'proto': '',
'interface': '',
'counters': '0',
'updatefreq': '',
'content': item_data,
'categories': '',
'description': item_description
}
cur_items[item_uuid] = y
print(json.dumps(parsed_json, indent=2))
$curl -X POST -d '{"address":"192.168.42.42"}' -H "Content-Type: application/json" -k -u $key:$secret https://opnsense/api/firewall/alias_util/add/test
{"status":"failed","status_msg":"nonexistent alias test"}