MataRatos
Hi. I've posted this on another place, guess it wasn't the right one...
I've already asked this on Openwrt forum and also googled, but couldn't find a straight answer: I have a router runing OpenWRT and OpenVPN server at home, which I can connect just fine with my Android phone, see all my home devices and use internet.
The question is: how can I setup my server and client config in order to connect to my home server and see the remote devices, but use internet for browsing, etc, in my phone. I don't want to tunnel internet for a question of speed.
I've tried lots of settings but none as worked so far. I can have a setup where I can access my home server and see my devices, but loose internet.
These are my configs, hope someone can help me with this:
/etc/config/openvpn
config 'openvpn' 'openvpn'
option 'enable' '1'
option 'port' '1194'
option 'proto' 'udp'
option 'dev' 'tun'
option 'client_to_client' '1'
option 'keepalive' '10 120'
option 'comp_lzo' 'yes'
option 'persist_key' '1'
option 'persist_tun' '1'
option 'verb' '3'
option 'mute' '20'
option 'ifconfig_pool_persist' '/tmp/ipp.txt'
option 'status' '/tmp/openvpnstatus.log'
option 'ca' '/etc/openvpn/ca.crt'
option 'cert' '/etc/openvpn/server.crt'
option 'key' '/etc/openvpn/server.key'
option 'dh' '/etc/openvpn/dh2048.pem'
option 'server' '172.16.0.0 255.255.255.0'
list 'push' 'route 192.168.1.0 255.255.255.0'
list 'push' 'dhcp-option DOMAIN 192.168.1.1'
list 'push' 'dhcp-option DNS 192.168.1.1'
list 'push' 'redirect-gateway' - (I believe this setting's not doing anything because if I quote it out with # I still have everything working)
my client config
client
proto udp
dev tun
remote xxx.xxx.xxx.xxx 1194
pkcs12 xperiaj.p12
ns-cert-type server
comp-lzo 1
persist-key
persist-tun
nobind
resolv-retry infinite
verb 3
mute 10
/etc/config/firewall
config zone
option input 'ACCEPT'
option output 'ACCEPT'
option name 'VPN'
option forward 'REJECT'
option network 'VPN'
config rule
option target 'ACCEPT'
option src 'lan'
option dest 'VPN'
option name 'LAN-VPN'
config rule
option target 'ACCEPT'
option src 'VPN'
option dest 'lan'
option name 'VPN-LAN'
config rule
option target 'ACCEPT'
option src 'wan'
option proto 'udp'
option dest_port '1194'
option name 'OpenVPN'
config forwarding
option dest 'wan'
option src 'VPN'