xdp-filter
linux
Load and manage an eBPF XDP packet filter. Part of the xdp-tools collection.
More info →Options (3)
-p, --policybooleanLoad the filter on an interface in skb (generic) mode with default allow policy
Example:
sudo xdp-filter load {{[-p|--policy]}} allow {{[-m|--mode]}} skb {{network_interface}}-m, --modebooleanLoad the filter on an interface in skb (generic) mode with default allow policy
Example:
sudo xdp-filter load {{[-p|--policy]}} allow {{[-m|--mode]}} skb {{network_interface}}-i, --intervalbooleanPoll packets and show statistics every 10000 milliseconds
Example:
sudo xdp-filter poll {{[-i|--interval]}} 10000Examples (6)
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_interfaceUnload the filter from an interface
sudo xdp-filter unload network_interfaceDeny traffic to a specific destination port
sudo xdp-filter port destination_portDeny traffic from a specific source IP address
sudo xdp-filter ip [-m|--mode] src source_ipDeny traffic from a specific source MAC address
sudo xdp-filter ether [-m|--mode] src mac_addressPoll packets and show statistics every 10000 milliseconds
sudo xdp-filter poll [-i|--interval] 10000made by @shridhargupta | data from tldr-pages