HI!
I've been trying to setup a basic OpenVpn server. I tried many times, but I still can't get it to work. My setup:
Internet - ISP ( Modem and router combo - gateway: 192.168.0.1) - Archer C5v1.2 ( LEDE 17.01, WAN IP: 192.168.0.2, serves as gateway (for all other devices) 192.168.1.1). I also have a ddns aquired and the port 1194 opened (tcp+udp) on both router. In the last attempt I followed the script based setup on the OpenWrt site but didn't succeded. My OVPN file is
client
dev tun
proto tcp
fast-io
remote jazz.ddns.net 1194
remote-cert-tls server
nobind
persist-key
persist-tun
comp-lzo on
verb 7
key-direction 1
<ca>
-----BEGIN CERTIFICATE-----
ca
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
cert
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
the_key.....
-----END PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
-----BEGIN OpenVPN Static key V1-----
..
-----END OpenVPN Static key V1-----
</tls-auth>
Log file:
Mon Jun 25 14:56:40 2018 OpenVPN 2.4.4 mips-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
Mon Jun 25 14:56:40 2018 library versions: OpenSSL 1.0.2k 26 Jan 2017, LZO 2.09
Mon Jun 25 14:56:40 2018 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Mon Jun 25 14:56:40 2018 TUN/TAP device ovpns0 opened
Mon Jun 25 14:56:40 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Mon Jun 25 14:56:40 2018 /sbin/ifconfig ovpns0 192.168.200.1 netmask 255.255.255.0 mtu 1500 broadcast 192.168.200.255
Mon Jun 25 14:56:40 2018 Could not determine IPv4/IPv6 protocol. Using AF_INET
Mon Jun 25 14:56:40 2018 UDPv4 link local (bound): [AF_INET][undef]:1194
Mon Jun 25 14:56:40 2018 UDPv4 link remote: [AF_UNSPEC]
Mon Jun 25 14:56:40 2018 Initialization Sequence Completed
Since I found another tutorial I ran that but couldn't get that ICA creation to work. I issued the commands:
openssl req -out ca/csr/vpn-server.csr -new -days 3650 -sha5
12 -newkey rsa:2048 -keyout openvpn/vpn-server.key.pem -config ./openssl.cnf -ex
tensions v3_vpn_server -nodes
Which got me the error
Error Loading extension section v3_vpn_server
Now I am totally confused and my firewall is just a mess. How to proper do this and which tutorial to follow, since there are at least 3 of them? How to clean it without deleting additional entries and keeping the system on USB?