# 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: ```bash git clone https://gitea.tofasthacker.ddnsfree.com/tofasthacker/ip_block.git ``` 2. Change into the repository directory: ```bash cd ip_block ``` 3. Make the main script executable: ```bash chmod +x whitelist_us chmod +x add_ipset chmod +x toggle_block ``` 5. Run the tool: ```bash 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](LICENSE). Feel free to use, modify, and distribute the code in accordance with the terms of the license.