iptables/README.md

17 lines
728 B
Markdown
Raw Normal View History

2020-12-06 17:06:09 -05:00
# iptables
2020-12-06 17:13:05 -05:00
Here is my script that I use to update iptables with data.
The different files are listed in lists and are hopefully somewhat self explanatory
2020-12-06 17:17:28 -05:00
Anything with .list end in the zone folder will be added to the block list. This was initially used to block countries, but you can use it to block anything.
Add ```update.sh``` in your cron
Load iptables and ipset rules however you please on start up
This is done by the following. Some of my servers have it in ```/etc/rc.local``` others have it in ```/etc/network/interface``` as post-up script
```iptables-restore < /path/to/iptables.save```
2020-12-06 17:17:50 -05:00
2020-12-06 17:17:28 -05:00
```ipset restore < /path/to/ipset.save```
There may be a better way to do this, but this works for me on some servers.