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

    Remote PC reach mye home server via openVPN, how dos it work...

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 3 Posters 425 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.
    • M
      Modesty
      last edited by

      Hi

      I have tried to understand how this openVPN works when I am on my work computer and access my home server through openVPN.

      On my work computer I can surf to cnn.com etc. and that is going outside of openVPN tunnel.

      I can also reach my home server via openVPN.
      When I connect work computer I mount h: drive on my work pc to home server like "net use h: \192.168.50.50" Works like a charm.

      I can also connect directly to server in a browser http:\192.168.50.50

      Since I both can reach home server + reach all Internet, how is this working. I did expect work pc to only reach internet through openVPN connection.

      Can anybody enlighten me, what is going on? How can a computer both be on safe openVPN and simultaneously be on unsafe Internet? Is this safe? Should i try to force my work computer (I don't know how) to only use openVPN for all connections, is it possible?

      Everything can be rebuilt!

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

        Hi,

        @MOdesty said in Remote PC reach mye home server via openVPN, how dos it work...:

        Should i try to force my work computer (I don't know how) to only use openVPN for all connections, is it possible?

        When you launch the VPN Client on your work PC, a tunnel is constructed to your OpenVPN server.

        With server options like these :
        f9fefab4-c907-49cd-976a-b6dd1c32b0df-image.png
        and
        a136e83f-3304-480a-b89a-fd4d3007d59f-image.png

        you enforce that all communcation goes through the VPN.
        It's your home OpenVPN server that becomes your gateway to the net.
        This means that you can access local (home) resources - and the entire net through your VPN.

        This behaviour can be changes how ever. It's all up to the settings (routing info and such).

        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
        • V
          viragomann
          last edited by

          If you establish a VPN connection on a computer it has at least two network interface, the Ethernet or wireless and the virtual VPN interface.
          Which interface is used for outgoing traffic is ruled by routes on the computer.

          Now, the OpenVPN client is capable to add routes on the client computer and the OpenVPN server can tell the client, which routes are to be added (push routes).

          In the server settings you have two options to push routes to the client:

          • If you check "Redirect gateway" the server pushes the default route to the client, which means that the client directs all upstream traffic to the VPN server. This way you can surf the internet via the OpenVPN servers internet connection and its public IP.
          • If you don't check "Redirect gateway" you can enter the subnets which should be directed over the VPN into the "Local Network/s" box. So if your local LAN is 192.168.50.0/24 and you state this subnet at "Local Network/s" only the route for this subnet is added to the clients routing table. So if you access an IP within this subnet on the client it goes out over the VPN virtual interface, while other traffic is directed to its default gateway.
          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.