IPTables IPset List Creation Blocking Usage
IPTables IPset List Creation Blocking Usage
You can use the following commands.
!/usr/bin/env bash
## apt install ipset -y
ipset -N my_test_list iphash
ipset -A my_test_list 5.252.204.226/29
iptables -A INPUT -m set --match-set my_test_list src -j DROP
ipset -A my_test_list 5.252.204.226
## delete ipset list
ipset -X mytest_list
## Save permanently
ipset save > /etc/ipset.conf
To clear all conditions:
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t filter -F
iptables -t raw -F
iptables -t nat -F
iptables -t mangle -F
ipset -F
ipset -X
Can't find the information you're looking for?
You have examined the knowledge base in detail, but if you cannot find the information you need,
Create a Support Ticket-
How to Open Ports in Windows?
210 2
-
How to Grant Windows Administrator Privileges?
184 0
-
How to install Webmin on Ubuntu?
803 2
-
Linux SSH Terminal Commands and Explanations
686 3
-
CentOS Stream 10 Update Commands
769 1
-
CentOS Stream 9 Update Commands
1114 1
-
CentOS Stream 8 Update Commands
621 0
-
What is FreeBSD?
766 2
-
Out: 452 4.3.1 Insufficient system storage
708 2
-
Turning Off Automatic Updates in Windows Operating Systems
824 0