This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Generate a random IPv6 address for a specified subnet | |
""" | |
from random import seed, getrandbits | |
from ipaddress import IPv6Network, IPv6Address | |
subnet = '2001:db8:100::/64' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make table to keep track of IP's of SSH brute forcers: | |
table <bruteforce> persist | |
# Make sure they are unable to connect to the system after being appended to table: | |
block quick from <bruteforce> | |
# The rule how one is appended to the table.. | |
# By connecting with more then 5 clients to the SSH port | |
# and try reconnect 5 times within 30 secs, append client machine to the table: | |
pass inet proto tcp from any to any port ssh \ |