1
High availability / Re: Triggered scripts on failover
« on: April 22, 2022, 03:55:03 pm »
jprenken solved this issue: https://gist.github.com/jprenken/18ca7bf14ddae547ae0fdf6f56d72573
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.
#!/usr/local/bin/bash
set -ux
git clone git@ssh.dev.com/v3/opnsense-config /conf/backup/git
cd /conf/backup/git/
mkdir -p $HOST
cp $1 $HOST/config.xml
git add $HOST/config.xml
git commit -m "Config-Change of $HOST"
git push
cd .. && rm -rf /conf/backup/git
root@gw-zf-01:/usr/ports/net/intel-ix-kmod # make install
===> intel-ix-kmod-3.3.14_1 requires kernel source files in SRC_BASE=/usr/src.
*** Error code 1
Stop.
As far as I'm aware, the Wireguard server will always respond to the IP from which the last packet originated, right?
No. Just try it .. add some virutal IPs in different ranges and from an endpoint set the different IPs.
It's stateless, the operating system will choose the highest one (depending of it's networking stack).
WireGuard itself can not select the source IP which sends the packets.
Lets say unit 1 has 192.168.1.50, unit 2 has 192.168.1.51.
2 VIPs, 192.168.1.1 and 192.168.1.254.
WireGuard will always reply with the highest IP, there is no binding to an IP as the connection is stateless.
You have to report this feature request to WireGuard directly (did this couple of times).
Go to /usr/local/etc/rc.syshook.d/start/, copy 50-wireguard to 99-wireguard and make the call
/usr/local/etc/rc.d/wireguard restart
...
Name does not resolve: 'hostname.domain.tld:51820'
Configuration parsing error
[#] rm -f /var/run/wireguard/wg0.sock