{"action":"created","comment":{"url":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/comments/68886719","id":68886719,"diff_hunk":"@@ -0,0 +1,86 @@\n+#!/bin/bash\n+\n+##  Update fail2ban iptables with globally known attackers.\n+##  Actually, runs 100% independently now, without needing fail2ban installed.\n+##\n+##  /etc/cron.daily/sync-fail2ban\n+##\n+## Author: Marcos Kobylecki <fail2ban.globalBlackList@askmarcos.com>\n+## http://www.reddit.com/r/linux/comments/2nvzur/shared_blacklists_from_fail2ban/\n+\n+\n+## Quit if fail2ban is missing.  Maybe this fake requirement can be skipped? YES.\n+#PROGRAM=/etc/init.d/fail2ban\n+#[ -x $PROGRAM ] || exit 0\n+\n+datadir=/etc/fail2ban\n+[[ -d \"$datadir\" ]] || datadir=/tmp\n+\n+## Get default settings of fail2ban (optional?)\n+[ -r /etc/default/fail2ban ] && . /etc/default/fail2ban\n+\n+umask 000\n+blacklistf=$datadir/blacklist.blocklist.de.txt\n+\n+mv -vf  $blacklistf  $blacklistf.last\n+\n+badlisturls=\"http://antivirus.neu.edu.cn/ssh/lists/base_30days.txt http://lists.blocklist.de/lists/ssh.txt  http://lists.blocklist.de/lists/bruteforcelogin.txt\"\n+\n+\n+ iptables -vN fail2ban-ssh   # Create the chain if it doesn't exist. Harmless if it does.\n+  \n+# Grab list(s) at https://www.blocklist.de/en/export.html .  Block.\n+echo \"Adding new blocks:\"\n+ time  curl -s http://lists.blocklist.de/lists/ssh.txt  http://lists.blocklist.de/lists/bruteforcelogin.txt \\","path":"conf/blocklist/sync-fail2ban","position":34,"original_position":34,"commit_id":"2bdae89d24ef0cce398f0fb89373bbfaf78c145b","original_commit_id":"2bdae89d24ef0cce398f0fb89373bbfaf78c145b","user":{"login":"yodax","id":5643940,"avatar_url":"https://avatars.githubusercontent.com/u/5643940?v=3","gravatar_id":"","url":"https://api.github.com/users/yodax","html_url":"https://github.com/yodax","followers_url":"https://api.github.com/users/yodax/followers","following_url":"https://api.github.com/users/yodax/following{/other_user}","gists_url":"https://api.github.com/users/yodax/gists{/gist_id}","starred_url":"https://api.github.com/users/yodax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yodax/subscriptions","organizations_url":"https://api.github.com/users/yodax/orgs","repos_url":"https://api.github.com/users/yodax/repos","events_url":"https://api.github.com/users/yodax/events{/privacy}","received_events_url":"https://api.github.com/users/yodax/received_events","type":"User","site_admin":false},"body":"The exit status of curl isn't checked. If the remote server is down, the empty result set is processed I believe.","created_at":"2016-06-29T05:19:00Z","updated_at":"2016-06-29T05:19:00Z","html_url":"https://github.com/mail-in-a-box/mailinabox/pull/875#discussion_r68886719","pull_request_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/875","_links":{"self":{"href":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/comments/68886719"},"html":{"href":"https://github.com/mail-in-a-box/mailinabox/pull/875#discussion_r68886719"},"pull_request":{"href":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/875"}}},"pull_request":{"url":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/875","id":75514119,"html_url":"https://github.com/mail-in-a-box/mailinabox/pull/875","diff_url":"https://github.com/mail-in-a-box/mailinabox/pull/875.diff","patch_url":"https://github.com/mail-in-a-box/mailinabox/pull/875.patch","issue_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/875","number":875,"state":"open","locked":false,"title":"Blocklist (Split from #870)","user":{"login":"ChiefGyk","id":19499446,"avatar_url":"https://avatars.githubusercontent.com/u/19499446?v=3","gravatar_id":"","url":"https://api.github.com/users/ChiefGyk","html_url":"https://github.com/ChiefGyk","followers_url":"https://api.github.com/users/ChiefGyk/followers","following_url":"https://api.github.com/users/ChiefGyk/following{/other_user}","gists_url":"https://api.github.com/users/ChiefGyk/gists{/gist_id}","starred_url":"https://api.github.com/users/ChiefGyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChiefGyk/subscriptions","organizations_url":"https://api.github.com/users/ChiefGyk/orgs","repos_url":"https://api.github.com/users/ChiefGyk/repos","events_url":"https://api.github.com/users/ChiefGyk/events{/privacy}","received_events_url":"https://api.github.com/users/ChiefGyk/received_events","type":"User","site_admin":false},"body":"This script will pull lists from blocklist.de which I have been using for quite some time, and automatically bans malicious IP addresses that have been reported by the community via Fail2Ban. To report to Fail2Ban requires an account on blocklist.de (free and voluntary) which I personally have all my servers reporting to. They also generate the abuse report email to the provider automatically if the IP is in fact abusive. The script also adds a daily cron to make sure the list is up to date. \r\nThis is split continued from #864 and split from #870 ","created_at":"2016-06-28T17:05:25Z","updated_at":"2016-06-29T05:19:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9db7515a5ad6216e5aad535352a3671939c883cc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/875/commits","review_comments_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/875/comments","review_comment_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/875/comments","statuses_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/statuses/2bdae89d24ef0cce398f0fb89373bbfaf78c145b","head":{"label":"ChiefGyk:blocklist","ref":"blocklist","sha":"2bdae89d24ef0cce398f0fb89373bbfaf78c145b","user":{"login":"ChiefGyk","id":19499446,"avatar_url":"https://avatars.githubusercontent.com/u/19499446?v=3","gravatar_id":"","url":"https://api.github.com/users/ChiefGyk","html_url":"https://github.com/ChiefGyk","followers_url":"https://api.github.com/users/ChiefGyk/followers","following_url":"https://api.github.com/users/ChiefGyk/following{/other_user}","gists_url":"https://api.github.com/users/ChiefGyk/gists{/gist_id}","starred_url":"https://api.github.com/users/ChiefGyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChiefGyk/subscriptions","organizations_url":"https://api.github.com/users/ChiefGyk/orgs","repos_url":"https://api.github.com/users/ChiefGyk/repos","events_url":"https://api.github.com/users/ChiefGyk/events{/privacy}","received_events_url":"https://api.github.com/users/ChiefGyk/received_events","type":"User","site_admin":false},"repo":{"id":61990693,"name":"mailinabox","full_name":"ChiefGyk/mailinabox","owner":{"login":"ChiefGyk","id":19499446,"avatar_url":"https://avatars.githubusercontent.com/u/19499446?v=3","gravatar_id":"","url":"https://api.github.com/users/ChiefGyk","html_url":"https://github.com/ChiefGyk","followers_url":"https://api.github.com/users/ChiefGyk/followers","following_url":"https://api.github.com/users/ChiefGyk/following{/other_user}","gists_url":"https://api.github.com/users/ChiefGyk/gists{/gist_id}","starred_url":"https://api.github.com/users/ChiefGyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChiefGyk/subscriptions","organizations_url":"https://api.github.com/users/ChiefGyk/orgs","repos_url":"https://api.github.com/users/ChiefGyk/repos","events_url":"https://api.github.com/users/ChiefGyk/events{/privacy}","received_events_url":"https://api.github.com/users/ChiefGyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChiefGyk/mailinabox","description":"Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.","fork":true,"url":"https://api.github.com/repos/ChiefGyk/mailinabox","forks_url":"https://api.github.com/repos/ChiefGyk/mailinabox/forks","keys_url":"https://api.github.com/repos/ChiefGyk/mailinabox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChiefGyk/mailinabox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChiefGyk/mailinabox/teams","hooks_url":"https://api.github.com/repos/ChiefGyk/mailinabox/hooks","issue_events_url":"https://api.github.com/repos/ChiefGyk/mailinabox/issues/events{/number}","events_url":"https://api.github.com/repos/ChiefGyk/mailinabox/events","assignees_url":"https://api.github.com/repos/ChiefGyk/mailinabox/assignees{/user}","branches_url":"https://api.github.com/repos/ChiefGyk/mailinabox/branches{/branch}","tags_url":"https://api.github.com/repos/ChiefGyk/mailinabox/tags","blobs_url":"https://api.github.com/repos/ChiefGyk/mailinabox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChiefGyk/mailinabox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChiefGyk/mailinabox/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChiefGyk/mailinabox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChiefGyk/mailinabox/statuses/{sha}","languages_url":"https://api.github.com/repos/ChiefGyk/mailinabox/languages","stargazers_url":"https://api.github.com/repos/ChiefGyk/mailinabox/stargazers","contributors_url":"https://api.github.com/repos/ChiefGyk/mailinabox/contributors","subscribers_url":"https://api.github.com/repos/ChiefGyk/mailinabox/subscribers","subscription_url":"https://api.github.com/repos/ChiefGyk/mailinabox/subscription","commits_url":"https://api.github.com/repos/ChiefGyk/mailinabox/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChiefGyk/mailinabox/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChiefGyk/mailinabox/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChiefGyk/mailinabox/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChiefGyk/mailinabox/contents/{+path}","compare_url":"https://api.github.com/repos/ChiefGyk/mailinabox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChiefGyk/mailinabox/merges","archive_url":"https://api.github.com/repos/ChiefGyk/mailinabox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChiefGyk/mailinabox/downloads","issues_url":"https://api.github.com/repos/ChiefGyk/mailinabox/issues{/number}","pulls_url":"https://api.github.com/repos/ChiefGyk/mailinabox/pulls{/number}","milestones_url":"https://api.github.com/repos/ChiefGyk/mailinabox/milestones{/number}","notifications_url":"https://api.github.com/repos/ChiefGyk/mailinabox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChiefGyk/mailinabox/labels{/name}","releases_url":"https://api.github.com/repos/ChiefGyk/mailinabox/releases{/id}","deployments_url":"https://api.github.com/repos/ChiefGyk/mailinabox/deployments","created_at":"2016-06-26T13:42:16Z","updated_at":"2016-06-26T13:42:17Z","pushed_at":"2016-06-28T20:26:59Z","git_url":"git://github.com/ChiefGyk/mailinabox.git","ssh_url":"git@github.com:ChiefGyk/mailinabox.git","clone_url":"https://github.com/ChiefGyk/mailinabox.git","svn_url":"https://github.com/ChiefGyk/mailinabox","homepage":"https://mailinabox.email/","size":2207,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mail-in-a-box:master","ref":"master","sha":"82903cd09eea8b91367380a7777512489b031c5c","user":{"login":"mail-in-a-box","id":8107370,"avatar_url":"https://avatars.githubusercontent.com/u/8107370?v=3","gravatar_id":"","url":"https://api.github.com/users/mail-in-a-box","html_url":"https://github.com/mail-in-a-box","followers_url":"https://api.github.com/users/mail-in-a-box/followers","following_url":"https://api.github.com/users/mail-in-a-box/following{/other_user}","gists_url":"https://api.github.com/users/mail-in-a-box/gists{/gist_id}","starred_url":"https://api.github.com/users/mail-in-a-box/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mail-in-a-box/subscriptions","organizations_url":"https://api.github.com/users/mail-in-a-box/orgs","repos_url":"https://api.github.com/users/mail-in-a-box/repos","events_url":"https://api.github.com/users/mail-in-a-box/events{/privacy}","received_events_url":"https://api.github.com/users/mail-in-a-box/received_events","type":"Organization","site_admin":false},"repo":{"id":12271469,"name":"mailinabox","full_name":"mail-in-a-box/mailinabox","owner":{"login":"mail-in-a-box","id":8107370,"avatar_url":"https://avatars.githubusercontent.com/u/8107370?v=3","gravatar_id":"","url":"https://api.github.com/users/mail-in-a-box","html_url":"https://github.com/mail-in-a-box","followers_url":"https://api.github.com/users/mail-in-a-box/followers","following_url":"https://api.github.com/users/mail-in-a-box/following{/other_user}","gists_url":"https://api.github.com/users/mail-in-a-box/gists{/gist_id}","starred_url":"https://api.github.com/users/mail-in-a-box/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mail-in-a-box/subscriptions","organizations_url":"https://api.github.com/users/mail-in-a-box/orgs","repos_url":"https://api.github.com/users/mail-in-a-box/repos","events_url":"https://api.github.com/users/mail-in-a-box/events{/privacy}","received_events_url":"https://api.github.com/users/mail-in-a-box/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mail-in-a-box/mailinabox","description":"Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.","fork":false,"url":"https://api.github.com/repos/mail-in-a-box/mailinabox","forks_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/forks","keys_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/teams","hooks_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/hooks","issue_events_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/events{/number}","events_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/events","assignees_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/assignees{/user}","branches_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/branches{/branch}","tags_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/tags","blobs_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/git/refs{/sha}","trees_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/statuses/{sha}","languages_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/languages","stargazers_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/stargazers","contributors_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/contributors","subscribers_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/subscribers","subscription_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/subscription","commits_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/commits{/sha}","git_commits_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/git/commits{/sha}","comments_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/comments{/number}","issue_comment_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/comments{/number}","contents_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/contents/{+path}","compare_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/merges","archive_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/downloads","issues_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues{/number}","pulls_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls{/number}","milestones_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/milestones{/number}","notifications_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/labels{/name}","releases_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/releases{/id}","deployments_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/deployments","created_at":"2013-08-21T13:56:50Z","updated_at":"2016-06-29T04:06:46Z","pushed_at":"2016-06-28T20:27:00Z","git_url":"git://github.com/mail-in-a-box/mailinabox.git","ssh_url":"git@github.com:mail-in-a-box/mailinabox.git","clone_url":"https://github.com/mail-in-a-box/mailinabox.git","svn_url":"https://github.com/mail-in-a-box/mailinabox","homepage":"https://mailinabox.email/","size":3312,"stargazers_count":4808,"watchers_count":4808,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":399,"mirror_url":null,"open_issues_count":142,"forks":399,"open_issues":142,"watchers":4808,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/875"},"html":{"href":"https://github.com/mail-in-a-box/mailinabox/pull/875"},"issue":{"href":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/875"},"comments":{"href":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/875/comments"},"review_comments":{"href":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/875/comments"},"review_comment":{"href":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/875/commits"},"statuses":{"href":"https://api.github.com/repos/mail-in-a-box/mailinabox/statuses/2bdae89d24ef0cce398f0fb89373bbfaf78c145b"}}}}
{"actor":{"display_login":"yodax"}}