Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dpi:dpi_components:radius:radius_config:start [2023/11/07 09:41] – [CIDR-based NAT Connection] elena.krasnobryzh | en:dpi:dpi_components:radius:radius_config:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Configuration ====== | ||
- | {{indexmenu_n> | ||
- | Radius Accounting needs to be put into the DPI device ports along with the network traffic. This can be done by mirroring the ports to which the Radius server is connected. | ||
- | ===== TAP Interfaces Setup ===== | ||
- | Radius Monitor can be launched on the same server as FastDPI or it can be placed on an external server. To allocate the necessary traffic, two virtual interfaces TAP0 and TAP1 are used.\\ | ||
- | {{: | ||
- | **Placing Radius monitor on the same server. Bridge is used.**\\ | ||
- | \\ | ||
- | \\ | ||
- | {{: | ||
- | **Placing Radius monitor on an external server. Tunnel is used.** | ||
- | * TAP0 - is used for traffic steering | ||
- | * TAP1 - listens to Radius Monitor | ||
- | * A Bridge or Tunnel is created between TAP0 and TAP1 to transfer traffic. | ||
- | * Mac learning is disabled on the TAP0 interface | ||
- | Run the following commands from the console: | ||
- | < | ||
- | ip tuntap add tap0 mode tap | ||
- | ip tuntap add tap1 mode tap | ||
- | |||
- | ip link set dev tap0 up | ||
- | ip link set dev tap1 up | ||
- | |||
- | ip link add br0 type bridge | ||
- | |||
- | ip link set tap0 master br0 | ||
- | bridge link set dev tap0 learning off | ||
- | ip link set tap1 master br0 | ||
- | |||
- | ifconfig tap0 192.168.4.20 up | ||
- | ifconfig tap1 192.168.4.21 up | ||
- | ifconfig br0 up | ||
- | </ | ||
- | <note warning> | ||
- | |||
- | ===== Traffic Steering Setup ===== | ||
- | Connect the traffic steering service to FastDPI: | ||
- | < | ||
- | fdpi_ctrl load profile --service 14 --profile.name radius | ||
- | fdpi_ctrl load --service 14 --profile.name radius --ip 10.16.252.11 | ||
- | fdpi_ctrl load --service 14 --profile.name radius --ip 10.16.252.12 | ||
- | </ | ||
- | here: | ||
- | * 1813, | ||
- | * 10.16.252.11, | ||
- | |||
- | ===== Radius Monitor Setup ===== | ||
- | <note important> | ||
- | < | ||
- | # FastDPI RADIUS configuration parameters: | ||
- | # listening interface name | ||
- | in_dev=tap1 | ||
- | # listening port number (or a list of ports separated by commas) with Radius Accounting packets | ||
- | rad_acct_port=1813, | ||
- | # save bad PDUs in pcap format for analysis | ||
- | rad_save_pdu=0 | ||
- | # analyze PDU with code 2 and 4 | ||
- | rad_check_code_pdu=2: | ||
- | # analyze PDU with status 1 and 3 | ||
- | rad_check_acct_status_type=1: | ||
- | # initialize memory at start | ||
- | mem_preset=1 | ||
- | # List of DPI servers, to send data to | ||
- | fdpi_servers=127.0.0.1: | ||
- | |||
- | # stream processing setup (it is recommended to use the values from the example) | ||
- | num_threads=1 | ||
- | rx_bind_core=0 | ||
- | services_bind_cores=0 | ||
- | engine_bind_cores=0 | ||
- | fifo_bind_cores=0 | ||
- | snaplen=2000 | ||
- | timeout_alarm=5 | ||
- | dbg_log_mask=0x31 | ||
- | </ | ||
- | |||
- | ===== CIDR-based NAT Connection ===== | ||
- | Create named NAT profiles at FastDPI: | ||
- | < | ||
- | fdpi_ctrl load profile --service 11 --profile.name nat_profile_all --profile.json '{ " | ||
- | </ | ||
- | In Radius monitor configuration file / | ||
- | < | ||
- | example: | ||
- | 0.0.0.0/ | ||
- | 10.0.0.0/ | ||
- | 10.1.1.0/ | ||
- | when there is a more specific profile for an address, then it is selected. | ||
- | </ | ||
- | |||
- | < | ||
- | ===== IPv6 Support ===== | ||
- | The file / | ||
- | < | ||
- | bind_ipv6_address=0 (by default - do not bind the address with the subscriber), | ||
- | bind_ipv6_subnet=0 (by default - do not bind), 64 (bind only for /64 subnets), 1 - bind for any subsets. Subnet is taken from the Delegated-IPv6-Prefix radius attribute (123) | ||
- | </ | ||
- | The subscriber is identified by the radius attribute User-Name or Calling-Station-ID (depending on the login_replace setting) | ||
- | < | ||
- | |||
- | ===== Subscribers Identification in mobile networks ===== | ||
- | In the configuration file / | ||
- | < | ||
- | login_replace=1 | ||
- | </ | ||
- | in this case, the radius attribute Calling-Station-ID is used instead of User-Name to identify the subscriber if it is present in the radius of the packet. | ||
- | |||
- | ===== Radius Monitor Additional Settings ===== | ||
- | < | ||
- | # FastDPI RADIUS configuration parameters: | ||
- | # outgoing interface name, if the Monitor operates in traffic pass mode | ||
- | # | ||
- | |||
- | # enable emulation of the redundant Radius server | ||
- | # | ||
- | |||
- | # enable emulation of the network card | ||
- | # | ||
- | |||
- | # secret value for generating responses in the server Radius emulation mode | ||
- | # | ||
- | |||
- | # add region prefixes to subscriber names (LOGIN) | ||
- | # | ||
- | |||
- | # listening port number (or a list of ports separated by commas) with Radius Authentication packets | ||
- | # | ||
- | |||
- | # allow multiple IPs on the same USER-NAME see command load --bind_multi, | ||
- | # | ||
- | </ | ||
- | |||
- | ==== Addition of subscriber names (LOGIN) with region prefixes ==== | ||
- | This is used when the Radius monitor and SSG serve several regions, and the user-name in different regions can overlap with other regions, so they can be separated into different login\\ | ||
- | |||
- | 1. Turn on the setting rad_prefix_info=1\\ | ||
- | |||
- | 2. Add \\ to the file / | ||
- | < | ||
- | 172.17.76.1 MSK- | ||
- | 172.17.76.2 MSK- | ||
- | 172.17.76.3 SPB- | ||
- | 172.17.76.4 SPB- | ||
- | 172.17.76.5SPB- | ||
- | </ | ||
- | where:\\ | ||
- | the first field is the NAS-IP-Address from the Radius package\\ | ||
- | second field - what prefix will be added to login\\ | ||
- | |||
- | See also: [[en: |