Skip to content

Simple HTTP API to add ipset entries with timeout

License

Notifications You must be signed in to change notification settings

selivan/ipset-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipset-http

Simple HTTP API to add ipset entries with timeout

Run:

sudo python3 ipset_http.py --port 9000 --set-name blocked --timeout 60 --whitelist 127.0.0.0/8,172.16.30.0/24

Use HTTP API to modity ipsets:

# Add IP to default set with default timeout
curl "http://127.0.0.1:9000/?add_ip=192.168.0.1"
# Add IP to given set with given timeout
curl "http://127.0.0.1:9000/?add_ip=192.168.0.2&set_name=blocked2&timeout=180"

About

Simple HTTP API to add ipset entries with timeout

Topics

Resources

License

Stars

Watchers

Forks

Languages