Menu

Show posts

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

Messages - 3isenHeiM

#1
The issue was related to not setting a network address in the field "server".

Setting a Network IP/Netmask solved the issue.
#2
24.1, 24.4 Legacy Series / Cannot setup OpenVPN Server
February 09, 2024, 10:38:32 PM
I've followed the Road Warrior article adapted for the new version.

However, in the logs I have this message :

/usr/local/opnsense/scripts/openvpn/ovpn_service_control.php: The command '/usr/local/sbin/openvpn --config '/var/etc/openvpn/instance-551f641a-4238-41f4-a0d9-eddd9b72ebff.conf'' returned exit code '1', the output was 'Options error: error parsing --server parameters Use --help for more information.'

Here is the configuration file mentionned in the comand :

push "redirect-gateway def1"
push "route 192.168.99.0 255.255.255.0"
dev ovpns2
ping-timer-rem
topology subnet
dh /usr/local/etc/inc/plugins.inc.d/openvpn/dh.rfc7919
verify-client-cert require
server 10.164.136.1 0.0.0.0
client-config-dir /var/etc/openvpn-csc/2
auth-user-pass-verify "/usr/local/opnsense/scripts/openvpn/ovpn_event.py --defer '551f641a-4238-41f4-a0d9-eddd9b72ebff'" via-env
learn-address "/usr/local/opnsense/scripts/openvpn/ovpn_event.py '2'"
client-disconnect "/usr/local/opnsense/scripts/openvpn/ovpn_event.py '551f641a-4238-41f4-a0d9-eddd9b72ebff'"
tls-verify "/usr/local/opnsense/scripts/openvpn/ovpn_event.py '551f641a-4238-41f4-a0d9-eddd9b72ebff'"
persist-tun
persist-key
dev-type tun
dev-node /dev/tun2
script-security 3
writepid /var/run/ovpn-instance-551f641a-4238-41f4-a0d9-eddd9b72ebff.pid
daemon openvpn_server2
management /var/etc/openvpn/instance-551f641a-4238-41f4-a0d9-eddd9b72ebff.sock unix
proto udp4
verb 3
up /usr/local/etc/inc/plugins.inc.d/openvpn/ovpn-linkup
down /usr/local/etc/inc/plugins.inc.d/openvpn/ovpn-linkdown
port 1194
local 255.255.255.0
client-to-client


I believe it's the line

server 10.164.136.1 0.0.0.0

That poses problem. The manpage of the opnvpn binary mentions this :

Multi-Client Server options (when --mode server is used):
--server network netmask : Helper option to easily configure server mode.


In my opition, the 0.0.0.0 should be replaced by the netmask of the server. How can I achieve this ?

Thanks