C
C
CeBePHblY2016-04-01 07:54:50
linux
CeBePHblY, 2016-04-01 07:54:50

Ipset - created a table with ip. How can I clear it now?

a couple of questions arose on iptables and ipset:
1) created a whitelist of several thousand ip, this ip list must be updated every day from sources. How can I clear/remove the whitelist?
2) I try to do this in order to let these same ip from the list on the server, I do this

#разрешаем ip из списка
sudo iptables -A INPUT -m set --match-set whitelist src -j ACCEPT
#остальных блокируем
sudo iptables -A INPUT -j DROP

but for some reason all ip are blocked, including those who are on the list. how to do it right?
Or should I just remove it?
sudo iptables -A INPUT -j DROP

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Archie Kuznetsov, 2016-04-01
@Wolf4ara

1) ipset flush [ SETNAME ]
2) are these all the rules? higher no more?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question