My aim:
I want to be able to connect to my home LAN securely from my iPhone or even the work PC (if they allow connections to VPNs). More important is access via 4G on my phone. Normal internet should go through 4G, not the server (however I may want to change this later on).
My setup and 1st attempt at setting up an OpenVPN Server:
My router runs DD-WRT and has IP 192.168.0.1 with subnet 255.255.255.0
The version of DD-WRT on the router is quite old and I don't think it supported OpenVPN Server so I chose to install OpenVPN Server on another router I had lying around. This 2nd router was setup as a wireless Client Bridge. IP of 2nd router is 192.168.0.5
This is the guide I used to set up the server. (
https://advancedhomeserver.com/dd-wrt-and-openvpn-part-1/)
These are my settings on server, client and firewall:
Server:
push "route 192.168.0.0 255.255.255.0"
push "dhcp-option DNS 192.168.0.1"
server 10.1.1.0 255.255.255.0
dev tun0
proto udp
keepalive 10 120
push "redirect-gateway def1"
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
Client:
client
dev tun0
proto udp
remote domain_goes_here 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert iphone6splus.crt
key iphone6splus.key
ns-cert-type server
comp-lzo
verb 3
float
Firewall
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 10.1.1.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.1.1.0/24 -j MASQUERADE
The problem:
Things have been weird. I was able to connect with my iPhone to the server but not have access to my local LAN resources. Now that seems to also not be working. Can't connect over 4G, it just times out.
When I'm on my home WiFi though, I can connect to the server but I don't know if accessing local resources is being tunneled through the server.
I don't really know what half the settings even mean so if anyone can assist and clarify that would be great.