OpenVPN TLS Auth Key-Direction option missing

Started by yenyen, March 26, 2025, 06:05:48 PM

Previous topic - Next topic
Hello,

I am new to opnsense and I am migrating a firewall from pfsense. I would like to set up an openvpn server with the same settings that the pfsense has (there are a lot of users, and I don't want to update any settings on the client side).

The only setting that I cannot find is the TLS key-direction. On the pfsense the setting "TLS keydir direction" is set to "Both directions".

But on opnsense, it automatically sets it to "key-direction 0". Is there any way to remove this line from the config file ?

Thank you

We found a hack to remove the line by editing the file /usr/local/opnsense/mvc/app/models/OPNsense/OpenVPN.php and commenting the line: $options['key-direction'] = $node->role == 'server' ? '0' : '1';.

After restarting openvpn with: pluginctl -s openvpn restart the ligne key-direction 0 is removed.

It's not perfect, but it works for now.