Files
higress/plugins/wasm-go/extensions/ip-restriction
2025-03-26 20:27:53 +08:00
..
2025-03-26 20:27:53 +08:00
2024-09-12 21:48:40 +08:00
2024-09-12 21:48:40 +08:00
2025-03-18 15:58:24 +08:00
2024-08-26 09:51:47 +08:00

title, keywords, description
title keywords description
IP Access Restriction
higress
ip restriction
IP access restriction plugin configuration reference

Function Description

The ip-restriction plugin can restrict access to services or routes by whitelisting or blacklisting IP addresses. It supports restrictions on a single IP address, multiple IP addresses, and CIDR ranges like 10.10.10.0/24.

Running Attributes

Plugin execution phase: Authentication Phase

Plugin execution priority: 210

Configuration Description

Configuration Item Type Required Default Value Description
ip_source_type string No origin-source Optional values: 1. Peer socket IP: origin-source; 2. Get from header: header
ip_header_name string No x-forwarded-for When ip_source_type is header, specify the custom IP source header
allow array No [] Whitelist
deny array No [] Blacklist
status int No 403 HTTP status code when access is denied
message string No Your IP address is blocked. Return message when access is denied
ip_source_type: origin-source
allow:
  - 10.0.0.1
  - 192.168.0.0/16
ip_source_type: header
ip_header_name: x-real-iP
deny:
  - 10.0.0.1
  - 192.169.0.0/16