From 97004439dc58f8e95fd2c68bbaf4f1590cb04ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Far=20Suba=C5=9F=C4=B1?= <111052826+basarsubasi@users.noreply.github.com> Date: Mon, 8 Sep 2025 22:48:42 +0300 Subject: [PATCH] xdp-filter: add page (#18049) Co-authored-by: Harshavardhan Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com> --- pages/linux/xdp-filter.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pages/linux/xdp-filter.md diff --git a/pages/linux/xdp-filter.md b/pages/linux/xdp-filter.md new file mode 100644 index 0000000000..80e29b5aab --- /dev/null +++ b/pages/linux/xdp-filter.md @@ -0,0 +1,29 @@ +# xdp-filter + +> Load and manage an eBPF XDP packet filter. +> Part of the xdp-tools collection. +> More information: . + +- Load the filter on an interface in skb (generic) mode with default allow policy: + +`sudo xdp-filter load {{[-p|--policy]}} allow {{[-m|--mode]}} skb {{network_interface}}` + +- Unload the filter from an interface: + +`sudo xdp-filter unload {{network_interface}}` + +- Deny traffic to a specific destination port: + +`sudo xdp-filter port {{destination_port}}` + +- Deny traffic from a specific source IP address: + +`sudo xdp-filter ip {{[-m|--mode]}} src {{source_ip}}` + +- Deny traffic from a specific source MAC address: + +`sudo xdp-filter ether {{[-m|--mode]}} src {{mac_address}}` + +- Poll packets and show statistics every 10000 milliseconds: + +`sudo xdp-filter poll {{[-i|--interval]}} 10000`