Best way to access vpn server localy
-
Hello,i try to find the best way to use my vpn server from my phone.The server is ok i can connect from my phone(ussing openvpn for android 0.7.5) but when i come home and my wifi kick in,my internet on the phone is not working,my goal is to use vpn as permanent connection so i don't need to connect and disconnect the client(yea i am lazzy)
My first "fix" was to bind the vpn server using any interface option and its working,but i don't know if its the best way,i don't like the idea to bind on all interfaces.
Right now when i am home my vpn client will disconnect and search for a local ip to use as a vpn server ip.
If someone know a more elegant way to do this pls give me a hint.
Thanks -
Hi,
In your case, binding to all interfaces (WAN, of course, and LAN) is the right thing to do.
Your VPN client in your phone is probably using an URL that resolves to your WAN IP.
Add a host override, the same URL, in your DNS (Resolver or forwarder) so that local connections are redirected to your LAN IP (instead of relooping into your WAN).
This way, your VPN client will restart the connection using the same URL from the inside and outside.edit : serious : a VPN to pfSense when connecting from the inside ?
-
Thanks for you time,i don't need a VPN when i am at home,but i don't know how to bypass vpn just when i am at home.If my vpn is active when i am connected to my home wifi it will lose connection and he try to connect to my wan.My wish is too be always on vpn because with my work i go in many places.
I will try your idea with dns override,sems more clean,right now i have on my client config my wan and my lan ip,so he will try next if one will fail.
I might create 2 vpn servers one on wan and one on wifi interface.