Has anyone managed to get openvpn to go to openwrt?
My request derives from need to access my lan from another location by wan connection. I tested ovpn config file and inserted user/pass in the correct box but vpn won't to start. It is not mandatory use the ovpn profile. Also may be independent (probably more secure) client/server connection than intermediate servers service.
I prefer to use Luci interface if is possible.
For testing purpose i will try client (phone) to server (router) but if work properly the final use is router to router connection in order to merge the two lan.
OpenVPN sends a lot of messages to the System Log as clues for why the connection didn't start.
For a point to point between two sites that you control, Wireguard would be a lot simpler.
For either Wireguard or OpenVPN, the requirement is the same that one of the sites' ISP needs to provide an IP address that allows incoming connections from the Internet.
I don't why but i have no log about ovpn. Furthermore also using config file , the tunnel interface is not been created.Try to install wireguard. Installed wireguard nothing in the status.
Sat Jul 30 13:17:18 2022 kern.info kernel: [ 11.967237] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
Sat Jul 30 13:17:18 2022 kern.info kernel: [ 11.967272] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
Just as a data point --- I had openvpn configured and working well for several years in FreshTomato as an R7000 was my main router.
I switched main router to an openwrt router, and transitioned the settings from FreshTomato to openwrt. I followed openwrt forum and wiki instructions to take care of some hiccups.
The setup was working well for a while, but then my clients stopped being able to connect "without any other changes."
After trying "everything" I remembered reading in the commit logs that wolfssl was updated, and so I decided change my build config from openvpn-wolfssl to openvpn-openssl, and with that I was able to connect again.
Not suggesting that is your issue here, but noting this here in case others are compiling their own firmware, or building through buildbot and specifying the type openvpn build that this is something to look at.
I believe the default openwrt openvpn is built using openssl, so if the above doesn't make sense, it likely doesn't apply to your scenario.
I've seen both pages,last evening i tried again to create OpenVPN server but not terminated due to long time creating key and i followed the instruction at https://openwrt.org/docs/guide-user/services/vpn/openvpn/server . Previous time i've terminated the procedure ( dragged and dropped from page to SSH cmd) but no interface and firewall setting created . So something was goes wrong.Today i will try again .
Certainly I'm wrong in something, but either way I can't get them to work. The only exception is with Wireguard that once I run the script and configure the interface I can't navigate anymore. Once uninstalled, everything works properly again. Using OpenWrt 21.02.3. I've done other VPNs with other routers but I've never had as many problems as this time.
That's how a vpn client is set up so the service knows where to look for the user/password, I assume it would be the same for a server. You could also try it with just the keys to see if it's created without user/password.
Ok guys the vpn work . I can connect to server in my router using external ip. The problem is i can't access on my devices in the lan . May be a netmask restriction? I use /24. MyLAN may be 192.168.100.1 where the ip provides to VPN client is on 192.168.8.0 Lan. Furthermore nothing VPN interface compare in network/interface . Only Wan e Lan Interface. So if is correct i need to provide a client the same lan IP so 192.168.100.xxx . I hope the DHCP also work in this case.
This is parte of the server.conf file:
user nobody
group nogroup
dev tun
port 1194
proto udp
server 192.168.8.0 255.255.255.0
topology subnet
client-to-client
keepalive 10 60
persist-tun
persist-key
push "dhcp-option DNS 192.168.8.1"
push "dhcp-option DOMAIN lan"
push "redirect-gateway def1"
push "persist-tun"
push "persist-key"
<dh>
Can i modify the network provided by server 192.168.8.0 to my lan 192.168.100.0?
You don’t need to redact this info. It is not sensitive or secret. With it redacted, nobody can help. Only redact things that are unique and actually sensitive such as your wireguard keys, public ip, max addresses, and WiFi passwords.
OK. Actually VPN network is 192.168.8.0 while the router network is 192.168.100.0 . Both interface are /24 so 255.255.255.0 . The client connect successfully to external ip and VPN server but i cant access to my devices in lan 192.168.100.0 . It is the information that is missing. Are Enought?