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

    OpenVPN DHCP

    Scheduled Pinned Locked Moved OpenVPN
    2 Posts 2 Posters 1.2k 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.
    • ?
      Guest
      last edited by

      Hello,

      I have an question about OpenVPN server on pfSense 2.1.5.

      Is it possible to assign connected clients an IP from one big DHCP scope instead of for example 192.168.3.6 and the next one 192.168.3.10 (<-not sure if that is the right IP!)
      I want everyone connected to the VPN to get an normal IP range, so user 1 gets 192.168.3.2 and user 2 gets 192.168.3.2, and so on.

      Is this possible, and how can this be realized if it's possible?

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        @Chrisiesmit93:

        so user 1 gets 192.168.3.2 and user 2 gets 192.168.3.2, and so on.

        Well that would not be good if you gave the users the same IP.
        In your openvpn setup check the

        Allocate only one IP per client (topology subnet), rather than an isolated subnet per client (topology net30).
          Relevant when supplying a virtual adapter IP address to clients when using tun mode on IPv4.
        Some clients may require this even for IPv6, such as OpenVPN Connect (iOS/Android). Others may break if it is present, such as older versions of OpenVPN or clients such as Yealink phones.

        By default clients get IP in a /30 of the subnet you assigned to clients.  In my case 10.0.8.0/24, so they get /30 of that

        example
        Ethernet adapter vpn:

        Connection-specific DNS Suffix  . : local.lan
          Description . . . . . . . . . . . : TAP-Windows Adapter V9
          Physical Address. . . . . . . . . : 00-FF-5A-2F-7E-EA
          DHCP Enabled. . . . . . . . . . . : Yes
          Autoconfiguration Enabled . . . . : Yes
          IPv4 Address. . . . . . . . . . . : 10.0.8.6(Preferred)
          Subnet Mask . . . . . . . . . . . : 255.255.255.252
          Lease Obtained. . . . . . . . . . : Friday, February 20, 2015 7:45:05 AM
          Lease Expires . . . . . . . . . . : Saturday, February 20, 2016 7:45:05 AM
          Default Gateway . . . . . . . . . :
          DHCP Server . . . . . . . . . . . : 10.0.8.5
          DNS Servers . . . . . . . . . . . : 192.168.1.253
          NetBIOS over Tcpip. . . . . . . . : Enabled

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

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