-
Notifications
You must be signed in to change notification settings - Fork 75
Description
Describe the bug
PFsense allows tunnel_network and local_network to be specified as aliases. The GUI validation logic then expands these aliases before generating the ovpn config. This is not supported in pfsensible and generates an invalid .ovpn file with the alias text still present.
In attempting to correct this bug, I also noticed that once a valid ovpn is generated, I have to 'save' the existing config via the GUI for the interface start logic to work correctly. The tun interface rename never happens, so the ifconfig address assignment fails. This may be caused by attempting to call mwexec within the PfSsh.php shell as I can't get it to work manually there either.
Expected behavior
Aliases are expanded to IP(s) and a valid ovpn file is generated.
Playbook
Please paste a minimal playbook to reproduce the issue:
tunnel_network: 'TUNNEL_NET'
local_network: 'LOCAL_NETS'
Output
the 'server' line is absent from config.ovpn
the local_network is LOCAL_NETS instead of the expanded IP version expected.
Environment
- What version of pfsensible.core? 0.7.2
- What version of ansible? ansible [core 2.14.18] python version = 3.9.21
- What version of pfSense? 25.11-RELEASE (amd64)
Additional context
I have a working patch for expanding the aliases, but I am unable to get the vpn instance to create interfaces and start the daemon successfully without manual intervention in the GUI. Is this expected? I can submit a pull request for the alias expansion if these should be two separate issues.