I'd like to get an email alert from OPNsense when my WAN connection has dropped and reconnected. As a bonus it would be nice if it could also show me the new IP addresses (v4 and v6) within the email. How could I do this?
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#!/bin/sh
# just in case the other shell doesn't work: /usr/local/sbin/opnsense-shell
ipv6=`curl https://ipv6.icanhazip.com`
curl -X POST -u "<username>:<password>" https://dynupdate.no-ip.com/nic/update?hostname=<hostname> -d myipv6=${ipv6}curl "https://<username>:<password>@dynupdate.no-ip.com/nic/update?hostname=<hostname>&myipv6=<ipv6address>&myip=<ipv4address>"curl: (3) URL using bad/illegal format or missing URL#!/usr/local/sbin/opnsense-shell
IPV4=`curl https://ipv4.icanhazip.com/`
IPV6=`curl https://ipv6.icanhazip.com/`
curl \"https://<username>:<password>@dynupdate.no-ip.com/nic/update?hostname=<hostname>&myipv6=${IPV6}&myip=${IPV4}\"Quote from: Greelan on February 12, 2021, 04:27:14 PM
The plugin is old, and the No-IP part was no doubt written long before it provided IPv6 support. Only a few providers are given IPv6 support in the plugin (https://github.com/opnsense/plugins/blob/master/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc).
Judging from this thread (https://github.com/opnsense/plugins/issues/1611#issuecomment-706129596) it seems unlikely that it will be updated any time soon.
* No-IP - Last Tested: 20 July 2008Quote from: newsense on February 09, 2021, 06:21:08 AM
Other than verifying the hardware is fully operational on opnsense there's little benefit of running in live mode.
Furthermore, you'll be missing a lot of security patches and be stuck on the release image at least for the kernel, so in a nutshell, do a regular install and subsequent updates on a decent drive and keep a current backup when all is configured.