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
- Create ipset
ipset create {set-name} hash:ip
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_ssh_ip_block_xethhung12-0.0.2.tar.gz.
File metadata
- Download URL: py_ssh_ip_block_xethhung12-0.0.2.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38f8b672204469a13710a5ca2271bac21901af32f3dc2c873fb4a098661a3a61
|
|
| MD5 |
7cb73f15916eb7e3b7db1271229b2f38
|
|
| BLAKE2b-256 |
208551839632758cf3bd0b98d0071e28fb82796ce90ea2980a50f70d8cca0644
|
File details
Details for the file py_ssh_ip_block_xethhung12-0.0.2-py3-none-any.whl.
File metadata
- Download URL: py_ssh_ip_block_xethhung12-0.0.2-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c280be6cedece05a6974084ed26ac31c4efe5f234f00879f59cc1d904b810e6
|
|
| MD5 |
811427ae39ab86737c8cba38b78277d0
|
|
| BLAKE2b-256 |
22f02680b127a06df79f51aa92bf94a918a32104518c56d6e9a0691f9b2c255b
|