Go to file
2023-06-14 17:14:17 +00:00
add_ipset adding other files 2023-06-14 11:56:42 -04:00
change_ip_block adding other files 2023-06-14 11:56:42 -04:00
LICENSE added a license 2023-06-14 17:14:17 +00:00
README.md added a readme and cleaned up files 2023-06-14 13:06:55 -04:00
toggle_block added a readme and cleaned up files 2023-06-14 13:06:55 -04:00
whitelist_us adding other files 2023-06-14 11:56:42 -04:00

IPSet and iptables Country Blocker

This repository contains a bash tool that utilizes ipset and iptables to block access from specific countries to your server. The tool is designed to improve server security by restricting access to IP addresses associated with countries you specify.

Features

  • Utilizes ipset and iptables to block incoming traffic from specified countries.
  • Multi-threaded implementation for improved performance.
  • Simple installation and setup process.

Requirements

To use this tool, you need to ensure the following dependencies are installed on your system:

  • ipset
  • iptables

Installation

  1. Clone this repository to your desired location:
git clone https://gitea.tofasthacker.ddnsfree.com/tofasthacker/ip_block.git
  1. Change into the repository directory:
cd ip_block
  1. Make the main script executable:
chmod +x whitelist_us
chmod +x add_ipset
chmod +x toggle_block
  1. Run the tool:
sudo ./whitelist_us

Disclaimer

This tool aims to provide an additional layer of security by blocking access from specific countries. However, it is important to note that IP geolocation is not always accurate, and IP addresses can be easily spoofed or routed through other countries. Therefore, this tool should be used as part of a comprehensive security strategy and not as the sole means of protection.

Please use this tool responsibly and adhere to the laws and regulations of your jurisdiction.

License

This project is licensed under the MIT License. Feel free to use, modify, and distribute the code in accordance with the terms of the license.