Skip to content

ipset-persistent - sysv init script for saving and restoring ipset sets

License

Notifications You must be signed in to change notification settings

soar/ipset-persistent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

ipset-persistent

Use cases

The main use-case for this script - is to use it with iptables-persistent package. If you use sets in your iptables rules - sets should be loaded before this rules. This scripts declares dependencies for dependency-based booting - it starts before iptables-persistent and recreates all sets.

Installation

Manual

Clone repository to some directory:

cd /home/username
git clone https://github.com/soar/ipset-persistent.git ./

Copy files to system:

sudo cp --parent etc/ipset/README /
sudo cp --parent etc/default/ipset-persistent /
sudo cp --parent etc/init.d/ipset-persistent /

Add to autostart:

sudo update-rc.d ipset-persistent defaults

Usage examples

For example: create set and rule:

ipset create testset hash:net
iptables -A INPUT -m set --match-set testset src -j ACCEPT

Save it:

service ipset-persistent save

Now all sets will be recreated after system reboot.

About

ipset-persistent - sysv init script for saving and restoring ipset sets

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages