Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Best way to access vpn server localy

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 2 Posters 395 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lcbbcl
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by Gertjan

        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 ?

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • L
          lcbbcl
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.