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

    How does the OpenVPN client locate the OpenVPN server

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 3 Posters 802 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.
    • T
      tutitech
      last edited by

      Hi everyone, this is a very basic issue which I do not understand yet. I hope someone can draw some light on this.

      After configuring the OpenVPN server I made an export for clients, but I did not remember entering any information regarding the public ip address of the actual computer where PFSense and OpenVPN server are running. How does the client locate the OpenVPN server?

      1 Reply Last reply Reply Quote 0
      • J
        jptech
        last edited by

        There's a setting for it (see the attached screenshot).  By default it gets the interface IP and adds it to the exported .ovpn file as the remote directive.  Your interface is probably the WAN, so look in your .ovpn files for a line that has something like:

        
        remote 192.0.2.254 1194
        
        

        …but with your WAN IP rather than 192.0.2.254.

        openvpn-export-hostname-resolution.png
        openvpn-export-hostname-resolution.png_thumb

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

          In the client export utility you choose what to use as the remote server. I like to use a FQDN so if I change IP addresses the clients follow along.

          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
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.