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

How to assign statis ip for certain OpenVPN users?

Scheduled Pinned Locked Moved General pfSense Questions
2 Posts 2 Posters 359 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.
  • E
    emammadov
    last edited by Mar 5, 2018, 8:06 PM Mar 5, 2018, 1:29 PM

    Hello,

    I have posted this question on OpenVPN section about a week ago, but didn't get any reply, so I posted it here.

    I have OpenVPN that is working okay. But I want to assign statis ip for some of our vpn users.
    In OpenVPN Server / Clients Settings/ Toloplogy - Subnet - One IP address per client in a common subnet.
    In Client Specific Overrides I entered these:
    Common name of vpn user certificate - user
    Pv4 Tunnel Network - 192.168.5.5 (which I want to get this ip)
    IPv4 Local Network/s - 192.168.1.0/24 (user can see our network)
    Redirect Gateway - Force all client generated traffic through the tunnel.

    User gets ip 192.168.5.5 but can't see our network and can't ping 192.168.5.1 (vpn virtual network)

    I also added ifconfig-push 192.168.5.5 255.255.255.0; to Advanced. But couldn't get what we want. Please help me to solve this.

    Elvin

    1 Reply Last reply Reply Quote 0
    • K
      KOM
      last edited by Mar 5, 2018, 8:37 PM

      You were close.  You were missing the proper subnet mask.

      Leave IPv4 Local Networks(s) blank and add your custom stuff under IPv4 Tunnel Network like this:

      a.b.c.d/30

      For example, one of my users is set to 192.168.2.4/30 which means (I think) .4 for the network address, .5 for the gateway address, .6 for the actual IP address and .7 for the broadcast address.  My next user is 192.168.2.8/30 which gives him an IP address of 192.168.2.10.  Separate each user by 4.

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received