I have an external USB HDD plugged into the router's usb port. I can access that drive from any PC on the local network. I have an OpenVPN server setup on the router.
When I try to access the same drive while connected as an OpenVPN client, it's not there. I have found a few threads on this forum with the exact issue, but the configurations they've used are quite a bit dated.(2014)
I've used the most updated OpenVPN server configuration released by user "egc" (huge thanks to you for that!) to get it up and running. I'm out of ideas.
First try disabling the "CVE-2019-14899 Mitigation" option.
Make sure you're referencing the USB drive by its IP on the private network (e.g., 192.168.1.1) and NOT the OpenVPN server's IP on the tunnel. Of course, you also have to push that private network to OpenVPN client in the OpenVPN server Additional Config field. I'm just using 192.168.1.x as an example, so adjust accordingly.
Code:
push "route 192.168.1.0 255.255.255.0"
Note, the above is NOT necessary if you're already pushing the OpenVPN server as the default gateway to the OpenVPN client, but it never hurts to push it anyway (in case you later decide NOT to push the default gateway).
If it's still not working, try the following firewall script.
Code:
LAN_IP="$(nvram get lan_ipaddr)"
OVPN_NET="$(nvram get openvpn_net)/$(nvram get openvpn_tunmask)"
iptables -t nat -I POSTROUTING -s $OVPN_NET -o br0 -j SNAT --to $LAN_IP
I just disabled cve mitigation, added the push route(edited to 192.168.2.0), and added those firewall scripts. Still did not have any luck. The only firewall script I have up (before adding yours) was
egc, I followed that guide down to the letter just now. I have successfully been able to remote in the the HDD from my android phone while it's connected to OpenVPN.
Still can't get my laptop to see it. I've connected to the local network, mapped the drive, connected to a remote network then through OpenVPN. When attempting to connect to the mapped drive, it gives an error (see below). I've triple checked file sharing is enabled and tried turning off the windows defender firewall. Still nothing.
I've also tried removing the mapped drive and letting windows find it while connected remotely. Also no luck.
Any ideas?
edit: I forgot to add, I can ping the router's IP while connected to OpenVPN, I can ping the clients IP as well connected locally. I also have internet access as well.
iffin you will only:
push "dhcp-option DNSovpn server IP "
from your pic that would be:
push "dhcp-option DNS 10.8.0.1"
all ovpn clients should then use whatever DNS your local net uses...
...that's just what I have done for years on the EA8500
---
EDIT:
push router's IP or ovpn server's IP as DNS should work same but ---
reason I said you could push ovpn server IP as DNS ---
if also running unbound and pushing router's IP as DNS thru its ovpn server did NOT work...
...used to in old days but somepin changed with all that...or so it is on the EA8500.
Last edited by mrjcd on Thu Aug 13, 2020 8:27; edited 1 time in total
I had skipped the part to make a ccd directory in /jffs and creating the ccd config file as well.
I tried to remove the push route command because redirect default gateway is enabled but didn't work without it. Again, big thanks to egc for publishing this content for all of us. Thank you to everyone else that chimed in with suggestions as well.
edit: The USB HDD can also be accessed from my Android phone using AndSMB.