My /etc/rc.conf in FreeBsd 11:
hostname="abcd"
sshd_enable="YES"
static_routes="linklocal"
ifconfig_vtnet0="DHCP"
ifconfig_vtnet0_ipv6="inet6 accept_rtadv"
ipv6_activate_all_interfaces="YES"
rtsold_enable="YES"
rtsold_flags="-aF"
nginx_enable="YES"
postgresql_enable="YES"
openvpn_enable="YES"
openvpn_configfile="/usr/local/etc/openvpn/openvpn.conf" # it exists
openvpn_if="tun"
gateway_enable="YES"
firewall_enable="YES"
firewall_type="open"
firewall_nat_enable="YES"
firewall_nat_interface="vtnet0"
natd_enable="YES"
natd_interface="vtnet0"
natd_flags="-dynamic -m"
When trying to start openvpn:
$ sudo openvpn --config openvpn.conf
WARNING: Ignoring option 'dh' in tls-client mode, please only include this in your server configuration
disabling NCP mode (--ncp-disable) because not in P2MP client or server mode
Options error: You must define TUN/TAP device (--dev)
But why? I've already specified a device in rc.conf
How to fix that?
p.s.
sudo service openvpn start
===> /usr/local/etc/rc.d/openvpn: WARNING: failed to start openvpn