mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-12 23:59:11 +00:00
Update cheatsheets
This commit is contained in:
34
tldr/linux/arptables
Normal file
34
tldr/linux/arptables
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# arptables
|
||||
|
||||
> Manage ARP filtering rules using the `nftables` backend.
|
||||
> Part of the `xtables-nft` suite for ARP packet filtering.
|
||||
> More information: <https://manned.org/arptables>.
|
||||
|
||||
- List all ARP rules in the filter table:
|
||||
|
||||
`sudo arptables {{[-L|--list]}}`
|
||||
|
||||
- Append a rule to drop ARP packets from a specific IP address:
|
||||
|
||||
`sudo arptables {{[-A|--append]}} INPUT {{[-s|--source-ip]}} {{192.168.0.1}} {{[-j|--jump]}} DROP`
|
||||
|
||||
- Delete a specific rule from the INPUT chain by its rule number:
|
||||
|
||||
`sudo arptables {{[-D|--delete]}} INPUT {{rule_number}}`
|
||||
|
||||
- Flush all rules in the filter table:
|
||||
|
||||
`sudo arptables {{[-F|--flush]}}`
|
||||
|
||||
- Set the default policy of the OUTPUT chain to ACCEPT:
|
||||
|
||||
`sudo arptables {{[-P|--policy]}} OUTPUT ACCEPT`
|
||||
|
||||
- Save the current ARP rules to a file:
|
||||
|
||||
`sudo arptables-save > {{path/to/file}}`
|
||||
Reference in New Issue
Block a user