Install ocserv on FreeBSD
pkg安装ocserv
pkg install ocserv
启动时加载内核NAT
在 /boot/loader.conf
中添加
ipfw_load="YES"
ipdivert_load="YES"
net.inet.ip.fw.default_to_accept="1"
启用防火墙和NAT支持
在 /etc/rc.conf
中添加
gateway_enable="YES"
natd_enable="YES"
natd_interface="hn0"
firewall_enable="YES"
firewall_type="OPEN"
其中 hn0
是网卡名称
启动ocserv
/usr/local/sbin/ocserv -c /usr/local/etc/ocserv/ocserv.conf -f -d 4
service ocserv start
启动可能会报错
exec ocserv-worker failed No such file or directory on freebsd
直接通过上面命令行参数直接启动即可
参考资料
https://gitlab.com/openconnect/ocserv/-/issues/405
Back to Table of Contents
Disclaimer
- License under
CC BY-NC 4.0
- Copyright issue feedback
me#imzye.com
, replace # with @ - Not all the commands and scripts are tested in production environment, use at your own risk
- No personal information is collected.
Feedback