I can't run OpenVPN Server at OpenWRT
I install packages:
Using easy-rsa, I do the following:
easy-rsa init-pki easy-rsa build-ca nopass easy-rsa build-server-full vpn.server nopass
uci set network.vpn=interface uci set network.vpn.ifname=tun0 uci set network.vpn.proto=none uci commit uci add firewall zone uci set firewall.@zone[-1].name=vpn uci set firewall.@zone[-1].input=ACCEPT uci set firewall.@zone[-1].forward=ACCEPT uci set firewall.@zone[-1].output=ACCEPT uci set firewall.@zone[-1].network=vpn uci add firewall forwarding uci set firewall.@forwarding[-1].src='vpn' uci set firewall.@forwarding[-1].dest='wan uci add firewall rule uci set firewall.@rule[-1].name=OpenVPN uci set firewall.@rule[-1].target=ACCEPT uci set firewall.@rule[-1].src=wan uci set firewall.@rule[-1].proto=udp uci set firewall.@rule[-1].dest_port=1194 uci commit firewall /etc/init.d/network reload /etc/init.d/firewall reload
Everything works fine here
uci set openvpn.home=openvpn uci set openvpn.home.enabled=1 uci set openvpn.home.dev=tun uci set openvpn.home.port=1194 uci set openvpn.home.proto=udp uci set openvpn.home.log=/tmp/openvpn.log uci set openvpn.home.verb=3 uci set openvpn.home.ca=/root/pki/ca.crt uci set openvpn.home.cert=/root/pki/vpn.server.crt uci set openvpn.home.key=/root/pki/vpn.serwer.key uci set openvpn.home.server='10.9.19.0 255.255.255.0' uci set openvpn.home.dh=/root/pki/dh.pem uci commit openvpn /etc/init.d/openvpn enable /etc/init.d/openvpn start
After completing the last router freezes. No access to it. No internet access.
Unable to read logs. I need to restart the router to factory settings.
I performed these activities at OpenWRT 19.07 and 18.06 with the same result.
I noticed that the router has a problem with the server key. When I try to start the server after each new change in the settings, each time after adding the server key and starting the server the router hangs.
Please, help me. Maybe some suggestion. Maybe something else I can do.