https://github.com/andrey0001/iptables-dynamic
For use with ipset dynamically renewed
https://github.com/andrey0001/iptables-dynamic
dynamic firewall firewall-rules ipset ipset-lists iptables linux
Last synced: 2 months ago
JSON representation
For use with ipset dynamically renewed
- Host: GitHub
- URL: https://github.com/andrey0001/iptables-dynamic
- Owner: andrey0001
- Created: 2022-05-07T21:34:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-11T20:20:42.000Z (almost 3 years ago)
- Last Synced: 2025-02-13T08:29:48.338Z (4 months ago)
- Topics: dynamic, firewall, firewall-rules, ipset, ipset-lists, iptables, linux
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Use iptables with ipset and dymanic ip-s.
Small sripts to use with iptables for dynamic ip.
ipsetd - add ip of domain to ipset list (even if domain has more that one ip) . Check path of ipset programm inside.
> ipsetd (listname) (domain)trustlist.sh - add multiple domains to ipset. Also for use with cron. You can customize ipset list name by cli argument 1. By default name is trust-ip
> trustlist.sh [listname]Check and edit DomainsArray in trustlist.sh before use
Create new ipset list "trust-ip": ipset create trust-ip hash:ip
Run trustlist.sh
Add rule to iptables:
> iptables -I INPUT -m set --match-set trust-ip src -j ACCEPTThen add cron job:
> */5 * * * * /root/bin/trustlist.sh trust-ipEvery 5 min list will be renewed