Project

General

Profile

Actions

Bug #12076

closed

OpenVPN RADIUS-based firewall rules do not use expected value for RADIUS-assigned IP addresses

Added by Florian Lourdault over 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
OpenVPN
Target version:
Start date:
06/23/2021
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
22.01
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

Current OpenVPN script implemented to trigger Cisco-AVPair ACL in PF chains allows the {clientip} syntax to match IP address of the client initiating the VPN connection.

The script (/usr/local/sbin/openvpn.attributes.sh) relies on ${ifconfig_pool_remote_ip} variable passed from OpenVPN to generate a PF rule (temporary file) to later insert in PF running configuration.

For some reason the IP address returned by the OpenVPN pool is not the same as the Framed-IP-Address indicated by Radius (see screenshots). I also dumped variables passed by OpenVPN to the script and none contains the Framed-IP-Address.

The workaround I implemented on my pfsense was to replace the {clientip} substitution pattern while processing /etc/inc/util.inc if a framed_ip is set in attribute.


Files

pfsense_ovpn-radius-framedip.png (57.5 KB) pfsense_ovpn-radius-framedip.png Connection logs from OpenVPN client and server Florian Lourdault, 06/23/2021 03:35 PM
pfsense_ovpn-radius-framedip2.png (13.6 KB) pfsense_ovpn-radius-framedip2.png Framed-IP-Address configured for user (AD / NPS) Florian Lourdault, 06/23/2021 04:21 PM
ifconfig_Ubuntu.png (17.9 KB) ifconfig_Ubuntu.png Azamat Khakimyanov, 10/31/2021 11:05 AM
pcap_with_radius.png (98 KB) pcap_with_radius.png Azamat Khakimyanov, 10/31/2021 11:09 AM
vpnuser_IPv4_and_IPv6_attributes.png (94.5 KB) vpnuser_IPv4_and_IPv6_attributes.png Azamat Khakimyanov, 10/31/2021 11:11 AM

Related issues

Has duplicate Bug #12497: OpenVPN Server assignes random IPv4 addresses to active clients even if FreeRadius has configured Framed-IP for all these remote clientsDuplicateViktor Gurov

Actions
Actions

Also available in: Atom PDF