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 - trumee

#1
Hello,

The gandi.net api supports TTL. However, it no exposed in the UI


Is there any way to set TTL?

Thanks
#2
Thank you for posting this. I can confirm this behavior.

I migrated from pfsense to opnsense recently. And in pfsense i did not have to create this rule. After migration i went through similar experience, and ultimately settled on a NAT rule as you have described.
#3
Hello,
I am migrating my config from pfsense to wireguard. pfsense allows one to select which tunnel should not be part of the Wireguard Group using "Interface Group Membership". Is there any way to set this in opnsense?
#4
General Discussion / Re: Alias creation using API
October 28, 2023, 04:09:31 PM
Here is a python script which creates a json file for upload.


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))
#5
General Discussion / Alias creation using API
October 28, 2023, 02:59:53 PM
Hello,

I want to create a 'new' alias using the API. I am able to modify an existing alias but get the following error when creating a new alias:

$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"}


How do i create a new alias using the API?