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

    Variables for client-connect/client-disconnect scripts

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 3 Posters 994 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.
    • prtomasiP
      prtomasi
      last edited by

      Hi,

      Is it possible to find the available variables to use in client-connect/client-disconnect scripts (openvpn.attributes.sh) ?

      I found that $ifconfig_pool_remote_ip will bring the current remote IP from client

      But I didn't find the variable to get pfSense IP address (N.N.N.2/24 for example)
      The idea here is to insert a line that creates a new route that will be advertised via BGP when client connects, and dynamically be removed when client disconnects

      Thanks!

      bingo600B 1 Reply Last reply Reply Quote 0
      • bingo600B
        bingo600 @prtomasi
        last edited by bingo600

        @prtomasi
        IMHO
        BGP (especially external peers) , and frequent route updates is prob. not a good idea.

        /Bingo

        If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

        pfSense+ 23.05.1 (ZFS)

        QOTOM-Q355G4 Quad Lan.
        CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
        LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

        1 Reply Last reply Reply Quote 0
        • B
          biggsy
          last edited by

          Here is the OpenVPN list of environment variables.

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