ipblock

command module
v0.0.0-...-3819a2e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2019 License: MIT Imports: 1 Imported by: 0

README

Board Status

Build Status

codecov

ipblock

Notes


./ipblock rule ./test-fixtures/mail.log

# This will generate the script below ...

--- SCRIPT ---

#!/bin/bash
mkdir rules
cd rules
curl http://www.ipdeny.com/ipblocks/data/countries/all-zones.tar.gz -o all-zones.tar.gz
tar -xzf all-zones.tar.gz


for FILE in  de mx jp br ar cn es in co ve fr ua sy ie pa dk kr pl gt it ru
do
  echo -e '#!/bin/bash\n' > ${FILE}.sh
  awk '{printf("iptables -I INPUT 50 -s %s -j DROP\n",$1)}' "${FILE}.zone"  >> "${FILE}.sh"
  echo -e 'iptables-save | awk '"'"'!seen[$0]++'"'"'|iptables-restore\n' >> "${FILE}.sh"
  chmod 700 "${FILE}.sh"
done





Ref: www.ipdeny.com/ipblocks

Don't forget golint


golint -set_exit_status $(go list ./... | grep -v /vendor/)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL