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

#1
Hi

I'm using a shell script:
#!/bin/bash

OPNKEY="<api-key>"
OPNSECRET="<api-secret>"
OPNHOST="<opnsense-host-ip-dns>"
DEST="/mnt/backup/opnsense/"
MDATE=$(date +%Y%m%d-%H%M%S)

if test -d $DEST; then
curl -s -k -u $OPNKEY:$OPNSECRET https://$OPNHOST:8443/api/backup/backup/download \
-o $DEST/config-$OPNHOST-$MDATE.xml
cd $DEST
tar -czf config-$OPNHOST-$MDATE.xml.tar.gz config-$OPNHOST-$MDATE.xml
rm config-$OPNHOST-$MDATE.xml
find $DEST/ -type f -name '*.xml' -mtime +360 -exec rm {} \;
fi

Works for me even for 25.1.1 and all previous firmware versions.

Hope that helps!
bb
#2
German - Deutsch / Re: ddns mit Gandi LiveDNS
May 11, 2021, 09:15:26 PM
Habs rausgefunden.... steht ja bei den Ausrufezeichen im Menu ;-)

Host: example.com
user: subdomain (von example.com)
passw: API token

Done !!!
#3
Did you find any solution?

Gandi Live DNS is supported but I struggle with the configuration in Opensense.

Username/Password ? What about the APi key?
#4
German - Deutsch / ddns mit Gandi LiveDNS
May 06, 2021, 01:49:29 PM
Hallo

Ich sehe bei den Dyn DNS Services kann man Gandi LiveDNS definieren.
Wie habt Ihr das konfiguriert?

Bei Hostname: <fqdn>
Bei Username/Password müsste man irgendwie den API key mitgeben nehme ich an?

Vielen Dank für die Hilfe!
#5
Hi

I want to build a logic to build a firewall rule based on the server availability.
If the server is alive the rule should be in place. If the server goes down
the rule should be removed.

I don't know if there is a possibliity to create/remove a firewall or Nat rule via API call?

Thx bb