Ok, I was able to compile it on another machine. Havent tested it yet but in config there is:# The name of the tun devicedevice = vpnsIsnt this ok?
pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/libunistring-0.9.9.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/libidn2-2.0.4.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/libtasn1-4.13.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/p11-kit-0.23.10.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/tpm-emulator-0.7.4_2.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/trousers-0.3.14_2.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/gnutls-3.5.18.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/libev-4.24,1.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/libgpg-error-1.27.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/libgcrypt-1.8.2.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/libxslt-1.1.29_1.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/nspr-4.19.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/nss-3.36.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/xmlsec1-1.2.25.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/oath-toolkit-2.6.2.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/protobuf-3.5.1.1.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/protobuf-c-1.3.0_1.txz pkg add -f https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/ocserv-0.11.11.txz
connect-script = /usr/local/etc/ocserv/ocserv-script
#!/bin/sh if [ "$REASON" = "connect" ];then # Assign tunX to openvpn group ifconfig $DEVICE group openvpn echo "User '$USERNAME' from '$IP_REAL' connected. Local IP is '$IP_REMOTE'" else echo "User '$USERNAME' from '$IP_REAL' disconnected (in: $STATS_BYTES_IN, out: $STATS_BYTES_OUT, time: $STATS_DURATION)." fi exit 0
echo "ocserv_enable=YES" >> /etc/rc.conf.local
About the CAUTION: pfSense will indeed detonate, as you say, on reboot. There will be a missing interface, as the VPN software hasn’t created it yet. This will kick pfSense into the interface assignment part of the setup, which you’ll have to skip out of to continue booting. Since this requires access to the console, I could not use this at the remote site I was deploying it at, since accessing the console, even over the network, would of course require the network to be there in the first place.
# Script to call when a client connects and obtains an IP.# The following parameters are passed on the environment.# REASON, USERNAME, GROUPNAME, DEVICE, IP_REAL (the real IP of the client),# IP_REAL_LOCAL (the local interface IP the client connected), IP_LOCAL# (the local IP in the P-t-P connection), IP_REMOTE (the VPN IP of the client),# IPV6_LOCAL (the IPv6 local address if there are both IPv4 and IPv6# assigned), IPV6_REMOTE (the IPv6 remote address), IPV6_PREFIX, and# ID (a unique numeric ID); REASON may be "connect" or "disconnect".# In addition the following variables OCSERV_ROUTES (the applied routes for this# client), OCSERV_NO_ROUTES, OCSERV_DNS (the DNS servers for this client),# will contain a space separated list of routes or DNS servers. A version# of these variables with the 4 or 6 suffix will contain only the IPv4 or# IPv6 values.# The disconnect script will receive the additional values: STATS_BYTES_IN,# STATS_BYTES_OUT, STATS_DURATION that contain a 64-bit counter of the bytes # output from the tun device, and the duration of the session in seconds.
* Version 0.12.0 (released 2018-04-22)- Allow DTLS stream to come from different IP from TLS stream. There are situations where internet providers send the UDP stream from different IP (#61).- Increased possibilities of allowed combinations of authentication methods (#108).- Corrected regression since 0.11.8 with OTP authentication (#137).- Added support for hostname-based virtual hosts, utilizing TLS SNI. With that change it is possible to configure multiple servers running over the same port (#133).[b]- Rename the tun device on BSD systems which support SIOCSIFNAME ioctl.[/b]- Correctly handle proxy-protocol's health commands. That eliminates few connection drops when proxy protocol is in use.- Corrected crash on certain cases when proxy protocol is in use (#146).