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

    OpenVPN no Gateway assigned to client

    OpenVPN
    2
    7
    4.9k
    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.
    • S
      Stewart
      last edited by

      I've seen this pop up a few times but can't seem to find out what's going on.  I have OpenVPN set up for end users to connect in.  It connects, an IP is issued, the DNS server is issued, but no Gateway is issued.  The logs show the user is connected and authenticated.  I thought it would either automatically assign the Gateway or give me a spot to put it in.  Neither is the case.  What am I missing?

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        OpenVPN does not assign a gateway.

        It installs two routes: 0.0.0.0/1 and 128.0.0.0/1

        These cover the entire IPv4 internet, are more specific than 0.0.0.0/0 so they are preferred, and relieves OpenVPN of the duty to save and put back the existing default gateway when it closes.

        This is governed by the Redirect IPv4 Gateway checkbox in the server configuration.

        The client can also choose to ignore the gateway routes pushed by the server. In the pfSense client configuration, that is the Don't pull routes checkbox.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • S
          Stewart
          last edited by

          @Derelict:

          OpenVPN does not assign a gateway.

          It installs two routes: 0.0.0.0/1 and 128.0.0.0/1

          These cover the entire IPv4 internet, are more specific than 0.0.0.0/0 so they are preferred, and relieves OpenVPN of the duty to save and put back the existing default gateway when it closes.

          This is governed by the Redirect IPv4 Gateway checkbox in the server configuration.

          The client can also choose to ignore the gateway routes pushed by the server. In the pfSense client configuration, that is the Don't pull routes checkbox.

          I didn't realize that.  I didn't even bother to work on firewall rules since I was trying to troubleshoot the Gateway issue.  I added the rule in Firewall - Rules - OpenVPN to allow the IP range and now it's connecting out.  Thanks!

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            Right. The OpenVPN rules also need to pass traffic to any (after blocking access to anything it needs to block) in order for the clients to be able to use the global internet across the tunnel.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 0
            • S
              Stewart
              last edited by

              @Derelict:

              Right. The OpenVPN rules also need to pass traffic to any (after blocking access to anything it needs to block) in order for the clients to be able to use the global internet across the tunnel.

              Thanks a bunch.  One other question about passing DNS, though.  I have the DNS server passed through so the laptop is pointing to the Domain Controller for DNS across the VPN.  It properly queries for resolution for external addresses, but not internal machines.  For example, the server name is ServerDC.  If I run "nslookup ServerDC 192.168.100.10" I get UnKnown can't find ServerDC: Server failed"
              If I run "nslookup yahoo.com 192.168.100.10" it resolves properly.
              Both work from PCs inside the network so I'm thinking it's a VPN thing.  Any ideas?

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                You need to set the search domain properly on the client if you expect it to append the domain name in a lookup. Try resolving the FQDN. If that works it's a search domain problem.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • S
                  Stewart
                  last edited by

                  @Derelict:

                  You need to set the search domain properly on the client if you expect it to append the domain name in a lookup. Try resolving the FQDN. If that works it's a search domain problem.

                  Precisely correct.  I thought I had tried that but I went back through and looked at my previous pings and found I had misspelled it.  This is primarily for VPN protected RDP access so I can just use the FQDN of the server and it pops them in just fine.  Thanks again for your help!  You learn something new every day!

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