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

    Unexpected behavior of OpenVPN when adding advanced configuration [Solved]

    Scheduled Pinned Locked Moved OpenVPN
    2 Posts 1 Posters 612 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.
    • H
      hatimux
      last edited by

      Hi,

      I'm using a Radius server to authenticate OpenVPN users and to provide them with IP addresses using the attribute "Framed-IP-Address".
      I have tested that and it's working very well.

      Now when I try to add advanced configuration to my OpenVPN server (I use client-connect and client-connect to run some scripts), users are no longer getting IP addresses from the Radius server but rather they are getting automatic bind from the VPN server.

      Do you have any idea about the issue?

      Thank you!

      1 Reply Last reply Reply Quote 0
      • H
        hatimux
        last edited by

        I managed to find out the problem:

        In the configuration file of the OpenVPN server located in /var/etc/openvpn/server1.conf:

        client-connect /usr/local/sbin/openvpn.attributes.sh
        client-disconnect /usr/local/sbin/openvpn.attributes.sh

        The first line is responsible of adding attributes to the connecting clients, one of these attributes is the Radius attribute "Frame-IP-Address".

        These scripts get overridden if the client-connect and client-disconnect were added to the advanced configuration of OpenVPN.

        So to solve the problem, I deleted the "connect-client" entry from the advanced configuration and modified /usr/local/sbin/openvpn.attributes.sh with the necessary lines to execute (the lines I had in my old client-connect script).

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