-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ipv6 support #108
Open
kiekerjan
wants to merge
4
commits into
trick77:master
Choose a base branch
from
kiekerjan:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add ipv6 support #108
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
IPSET_BLACKLIST_NAME={{ ipsets_blacklist_name }} | ||
IPSET_BLACKLIST_NAME={{ ipsets_blacklist_name }} # change it if it collides with a pre-existing ipset list | ||
IPSET_TMP_BLACKLIST_NAME={{ ipsets_blacklist_name }}-tmp | ||
|
||
IP_BLACKLIST_RESTORE="{{ ipsets_confdir }}/ip-blacklist.restore" | ||
IP_BLACKLIST="{{ ipsets_confdir }}/ip-blacklist.list" | ||
IP_BLACKLIST_FILE="{{ ipsets_confdir }}/ip-blacklist.list" | ||
IP6_BLACKLIST_FILE="{{ ipsets_confdir }}/ip6-blacklist.list" | ||
|
||
VERBOSE={{ verbose }} # probably set to "no" for cron jobs, default to yes | ||
FORCE={{ force }} # will create the ipset-iptable binding if it does not already exist | ||
let IPTABLES_IPSET_RULE_NUMBER=1 # if FORCE is yes, the number at which place insert the ipset-match rule (default to 1) | ||
|
||
# Sample (!) list of URLs for IP blacklists. Currently, only IPv4 is supported in this script, everything else will be filtered. | ||
# Sample (!) list of URLs for IP blacklists. | ||
BLACKLISTS=( | ||
"{{ blacklists|join("\"\n \"") }}" | ||
) | ||
MAXELEM={{ maxelements }} | ||
MAXELEM={{ maxelements_v6 }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,25 +3,29 @@ IPSET_TMP_BLACKLIST_NAME=${IPSET_BLACKLIST_NAME}-tmp | |
|
||
# ensure the directory for IP_BLACKLIST/IP_BLACKLIST_RESTORE exists (it won't be created automatically) | ||
IP_BLACKLIST_RESTORE=/etc/ipset-blacklist/ip-blacklist.restore | ||
IP_BLACKLIST=/etc/ipset-blacklist/ip-blacklist.list | ||
IP_BLACKLIST_FILE=/etc/ipset-blacklist/ip-blacklist.list | ||
IP6_BLACKLIST_FILE=/etc/ipset-blacklist/ip6-blacklist.list | ||
|
||
VERBOSE=yes # probably set to "no" for cron jobs, default to yes | ||
FORCE=yes # will create the ipset-iptable binding if it does not already exist | ||
let IPTABLES_IPSET_RULE_NUMBER=1 # if FORCE is yes, the number at which place insert the ipset-match rule (default to 1) | ||
|
||
# Sample (!) list of URLs for IP blacklists. Currently, only IPv4 is supported in this script, everything else will be filtered. | ||
# Sample (!) list of URLs for IP blacklists. | ||
BLACKLISTS=( | ||
# "file:///etc/ipset-blacklist/ip-blacklist-custom.list" # optional, for your personal nemeses (no typo, plural) | ||
"https://www.projecthoneypot.org/list_of_ips.php?t=d&rss=1" # Project Honey Pot Directory of Dictionary Attacker IPs | ||
"https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=1.1.1.1" # TOR Exit Nodes | ||
"http://danger.rulez.sk/projects/bruteforceblocker/blist.php" # BruteForceBlocker IP List | ||
"https://www.spamhaus.org/drop/drop.lasso" # Spamhaus Don't Route Or Peer List (DROP) | ||
"https://cinsscore.com/list/ci-badguys.txt" # C.I. Army Malicious IP List | ||
"https://lists.blocklist.de/lists/all.txt" # blocklist.de attackers | ||
"https://blocklist.greensnow.co/greensnow.txt" # GreenSnow | ||
#"https://www.projecthoneypot.org/list_of_ips.php?t=d&rss=1" # Project Honey Pot Directory of Dictionary Attacker IPs | ||
#"https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=1.1.1.1" # TOR Exit Nodes | ||
#"http://danger.rulez.sk/projects/bruteforceblocker/blist.php" # BruteForceBlocker IP List | ||
"https://www.spamhaus.org/drop/drop.txt" # Spamhaus Don't Route Or Peer List (DROP) | ||
#"https://cinsscore.com/list/ci-badguys.txt" # C.I. Army Malicious IP List | ||
#"https://lists.blocklist.de/lists/all.txt" # blocklist.de attackers | ||
#"https://blocklist.greensnow.co/greensnow.txt" # GreenSnow | ||
"https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/firehol_level1.netset" # Firehol Level 1 | ||
"https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/stopforumspam_7d.ipset" # Stopforumspam via Firehol | ||
# "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/stopforumspam_7d.ipset" # Stopforumspam via Firehol | ||
# "https://raw.githubusercontent.com/ipverse/rir-ip/master/country/zz/ipv4-aggregated.txt" # Ban an entire country(-code), see https://github.com/ipverse/rir-ip | ||
Comment on lines
+16
to
25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should not be part of the PR |
||
# "https://raw.githubusercontent.com/ipverse/asn-ip/master/as/1234/ipv4-aggregated.txt" # Ban a specific autonomous system (ISP), see https://github.com/ipverse/asn-ip | ||
"https://www.spamhaus.org/drop/dropv6.txt" # Spamhaus Don't Route Or Peer List ipv6 (DROPv6) | ||
# "https://team-cymru.org/Services/Bogons/fullbogons-ipv6.txt" # Team Cymru Bogons | ||
) | ||
MAXELEM=131072 | ||
MAXELEM_V6=131072 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redefining the same bash variable.