X

Select Your Country

Turkey (Türkçe)Turkey (Türkçe) Worldwide (English)Worldwide (English)
X

Select Your Currency

Türk Lirası $ US Dollar

IPTables IPset List Creation Blocking Usage

IPTables IPset List Creation Blocking Usage
HomepageKnowledge BaseGeneralIPTables IPset List Creation Blocki...
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
Did you find it useful?
(541 times viewed. / 1 people found helpful.)