mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-15 11:48:46 +00:00
Update cheatsheets
This commit is contained in:
29
linux/ipset
Normal file
29
linux/ipset
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ipset
|
||||
|
||||
> A tool to create IP sets for firewall rules.
|
||||
> More information: <https://manned.org/ipset>.
|
||||
|
||||
- Create an empty IP set which will contain IP addresses:
|
||||
|
||||
`ipset create {{set_name}} hash:ip`
|
||||
|
||||
- Destroy a specific IP set:
|
||||
|
||||
`ipset destroy {{set_name}}`
|
||||
|
||||
- Add an IP address to a specific set:
|
||||
|
||||
`ipset add {{set_name}} {{192.168.1.25}}`
|
||||
|
||||
- Delete a specific IP address from a set:
|
||||
|
||||
`ipset del {{set_name}} {{192.168.1.25}}`
|
||||
|
||||
- Save an IP set:
|
||||
|
||||
`ipset save {{set_name}} > {{path/to/ip_set}}`
|
||||
Reference in New Issue
Block a user