LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

arptables

Manage ARP packet filtering rules.

TLDR

List ARP rules
$ sudo arptables -L
copy
Drop packets from IP
$ sudo arptables -A INPUT -s 192.168.0.1 -j DROP
copy
Delete rule by number
$ sudo arptables -D INPUT rule_number
copy
Flush all rules
$ sudo arptables -F
copy
Set default policy
$ sudo arptables -P OUTPUT ACCEPT
copy
Save rules to file
$ sudo arptables-save > path/to/file
copy

SYNOPSIS

arptables [OPTIONS] chain rule-specification

DESCRIPTION

arptables manages ARP (Address Resolution Protocol) packet filtering rules. It is similar to iptables but operates at the ARP level, allowing control over which ARP requests and replies are accepted or dropped.

PARAMETERS

-L, --list

List all rules in selected chain or all chains
-A, --append
Append rule to the end of chain
-I, --insert chain [rulenum]
Insert rule at the given position (default: top of chain)
-R, --replace chain rulenum
Replace an existing rule by number
-D, --delete
Delete matching rule or rule by number
-F, --flush
Flush all rules
-Z, --zero
Zero packet and byte counters in a chain
-P, --policy
Set default policy for a chain
-N, --new-chain name
Create a new user-defined chain
-X, --delete-chain [name]
Delete a user-defined chain
-s, --source-ip address
Match source IP address
-d, --destination-ip address
Match destination IP address
--source-mac address
Match source MAC address
--destination-mac address
Match destination MAC address
-i, --in-interface name
Match the input interface (INPUT, FORWARD)
-o, --out-interface name
Match the output interface (OUTPUT, FORWARD)
--opcode code
Match the ARP opcode (e.g., Request, Reply)
-j, --jump target
Target for rule (ACCEPT, DROP, etc.)

INSTALL

sudo pacman -S iptables
copy
sudo apk add iptables
copy
sudo zypper install iptables
copy
brew install iptables
copy
nix profile install nixpkgs#iptables
copy

CAVEATS

Requires root privileges. Uses the nftables backend on modern systems. The nft-based arptables provides only the INPUT and OUTPUT chains; the FORWARD chain exists only in the legacy implementation. ARP filtering operates at the layer 2/3 boundary and may affect network connectivity if misconfigured. Use arptables-save and arptables-restore to persist and reload rule sets.

HISTORY

arptables is part of the xtables-nft suite, providing ARP packet filtering integrated with the netfilter framework.

SEE ALSO

iptables(8), nft(8), arp(8), ebtables(8)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid