Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| firewalld [2019/10/22 09:12] – [Direct rules] admin | firewalld [2020/05/17 08:47] (current) – [IPSET] dani | ||
|---|---|---|---|
| Line 377: | Line 377: | ||
| =====IPSET===== | =====IPSET===== | ||
| + | **Very important: | ||
| + | |||
| To setup a blacklist using ipset, you have to follow this example: | To setup a blacklist using ipset, you have to follow this example: | ||
| - If you want to add first an old (active) '' | - If you want to add first an old (active) '' | ||
| - | ipset save blockednets > blockednets.ipset | + | ipset save blockednets > ipsetsavelist.ipset | 
| - | sed -e ' | + | sed -e ' | 
| </ | </ | ||
| - Create the ' | - Create the ' | ||
| Line 391: | Line 393: | ||
| - Optionally add additional networks:< | - Optionally add additional networks:< | ||
| firewall-cmd --permanent --ipset=blockednets --add-entry=119.6.204.0/ | firewall-cmd --permanent --ipset=blockednets --add-entry=119.6.204.0/ | ||
| - | </ | ||
| - | - Optionally check the ipset list:< | ||
| - | firewall-cmd --ipset=blockednets --get-entries | ||
| </ | </ | ||
| - Shows the permanent entries in a ipset:< | - Shows the permanent entries in a ipset:< | ||