Skip to main content

A small to scan the auth.log for faill ssh access and block the ip address that with fail count more than threshold

Project description

py_ssh_ip_block_xethhung12

Installation

pip install py-ssh-ip-block-xethhung

Prerequisite

Before start using the tool, two operation is required

  1. Create ipset
    ipset create {set-name} hash:ip 
    
  2. add iptables rule
    sudo iptables -A INPUT -m set --match-set {set-name} src -p tcp --destination-port {port} -j DROP 
    

Execution

Run through python project script

py-ssh-ip-block-xethhung12 -h

Delete Rules

Delete iptables rule

# get rule number
sudo iptables -L INPUT --line-numbers

# delete rule by line number
sudo iptable -D INPUT 2 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_ssh_ip_block_xethhung12-0.0.2.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_ssh_ip_block_xethhung12-0.0.2-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file py_ssh_ip_block_xethhung12-0.0.2.tar.gz.

File metadata

File hashes

Hashes for py_ssh_ip_block_xethhung12-0.0.2.tar.gz
Algorithm Hash digest
SHA256 38f8b672204469a13710a5ca2271bac21901af32f3dc2c873fb4a098661a3a61
MD5 7cb73f15916eb7e3b7db1271229b2f38
BLAKE2b-256 208551839632758cf3bd0b98d0071e28fb82796ce90ea2980a50f70d8cca0644

See more details on using hashes here.

File details

Details for the file py_ssh_ip_block_xethhung12-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for py_ssh_ip_block_xethhung12-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2c280be6cedece05a6974084ed26ac31c4efe5f234f00879f59cc1d904b810e6
MD5 811427ae39ab86737c8cba38b78277d0
BLAKE2b-256 22f02680b127a06df79f51aa92bf94a918a32104518c56d6e9a0691f9b2c255b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page