Skip to content

Python script for TCP Wrapper which grants access to selected countries only.

Notifications You must be signed in to change notification settings

1connect/connection-blocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

connection-blocker

Script to limit SSH and other types of connections to specified countries.

Usage

blocker.py {service name} {ip}

When country is valid, script returns exit status 0, otherwise 1.

Installation

  • Install packages:
apt-get install geoip-bin geoip-database python-geoip
  • Clone project repository into /scripts:
mkdir -p /scripts
cd /scripts
git clone https://github.com/1connect/connection-blocker.git
  • Add the following line to /etc/hosts.allow:
ALL: ALL: aclexec /scripts/connection-blocker/blocker.py %d %a
  • Then add to /etc/hosts.deny:
ALL: ALL

About

Python script for TCP Wrapper which grants access to selected countries only.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages