Rosa-Luxemburgstiftung-Berlin / ansible-opnsense

Ansible role to configure OPNsense firewalls
15 stars 8 forks source link

wireguard handler #85

Closed zerwes closed 1 month ago

zerwes commented 1 month ago

wip for #12 ...

zerwes commented 1 month ago
/usr/local/opnsense/scripts/Wireguard/wg-service-control.php -a configure
/usr/local/opnsense/scripts/Wireguard/wg-service-control.php -a restart

or just

configctl wireguard restart

?

zerwes commented 1 month ago
    <wireguard>
      <internal_dynamic>1</internal_dynamic>
      <descr>WireGuard (Group)</descr>
      <if>wireguard</if>
      <virtual>1</virtual>
      <enable>1</enable>
      <type>group</type>
      <networks/>
    </wireguard>

the wireguard interface group is missing

zerwes commented 1 month ago

Error wireguard /usr/local/opnsense/scripts/Wireguard/wg-service-control.php: The command '/usr/bin/wg syncconf 'wg0' '/usr/local/etc/wireguard/wg0.conf'' returned exit code '1', the output was 'fopen: No such file or directory'

zerwes commented 1 month ago

/api/wireguard/service/reconfigure

zerwes commented 1 month ago
# configctl interface invoke registration
OK
# configctl template reload OPNsense/Wireguard
OK
# configctl wireguard configure
OK