Question Block the traffic of a whole country

Joined
Mar 13, 2017
Messages
14
Likes
4
Points
18
Age
38
#1
Hello, I need to block the traffic of a whole country, give me some clue as to how to do it?

I'm getting brute-force attacks and bots to my VPS services only from Japanese IPs, and I need to block all of Japan's IP traffic.

I tried with IPTABLES with
You do not have permission to view link Log in or register now.
with the file "iptables-japan.txt" but when creating so many firewall rules the VPS collapses, the "CPU Load" goes up to 25 or 30 and the VPS stops responding, I'm attaching the file to you to see it.

They can give me an alternative or another way to do it, I have been testing for several days and I am not able to solve the problem of blocking all the traffic of a country to avoid bots or brute force.

Greetings.
 

Attachments

Jackbox

Active Member
Joined
Jan 2, 2016
Messages
108
Likes
55
Points
74
Age
24
#2
Hello, I need to block the traffic of a whole country, give me some clue as to how to do it?

I'm getting brute-force attacks and bots to my VPS services only from Japanese IPs, and I need to block all of Japan's IP traffic.

I tried with IPTABLES with
You do not have permission to view link Log in or register now.
with the file "iptables-japan.txt" but when creating so many firewall rules the VPS collapses, the "CPU Load" goes up to 25 or 30 and the VPS stops responding, I'm attaching the file to you to see it.

They can give me an alternative or another way to do it, I have been testing for several days and I am not able to solve the problem of blocking all the traffic of a country to avoid bots or brute force.

Greetings.
May I please know your VPS hosting provider?
 

EscuderoKevin

Active Member
Joined
Jul 2, 2015
Messages
404
Likes
172
Points
90
Age
26
Location
Argentina
#5
You like block people in your ts3 ? or in VM ?

---- Automatically Merged Double Post ----

Hello, I need to block the traffic of a whole country, give me some clue as to how to do it?

I'm getting brute-force attacks and bots to my VPS services only from Japanese IPs, and I need to block all of Japan's IP traffic.

I tried with IPTABLES with
You do not have permission to view link Log in or register now.
with the file "iptables-japan.txt" but when creating so many firewall rules the VPS collapses, the "CPU Load" goes up to 25 or 30 and the VPS stops responding, I'm attaching the file to you to see it.

They can give me an alternative or another way to do it, I have been testing for several days and I am not able to solve the problem of blocking all the traffic of a country to avoid bots or brute force.

Greetings.
https://www.ip2location.com/free/visitor-blocker For block in your VM
If u need block to your ts3 you need make script for BAN all users with that "flag" its easy.
 
Last edited:

Jackbox

Active Member
Joined
Jan 2, 2016
Messages
108
Likes
55
Points
74
Age
24
#7
2 options:

  1. Contact
    You do not have permission to view link Log in or register now.
    and let them know what you want to do. It is possible their security or hosting team already has a solution to block certain countries for you. If you are hosting a website and want web protection, consider using the
    You do not have permission to view link Log in or register now.
    or
    You do not have permission to view link Log in or register now.
    (web app firewall). With Cloudflare you may need to dig through the options to block countries but they do indeed allow you to block specific countries which can be helpful.
  2. Upgrade your hosting solution to something more powerful, like a dedicated server.
    You do not have permission to view link Log in or register now.
    if you are looking for an affordable dedicated hosting provider. They like to verify your information though, to combat spam and other malicious network behavior. Another great option is
    You do not have permission to view link Log in or register now.
    or
    You do not have permission to view link Log in or register now.
    --- discounted OVH servers from my understanding.

If you have any questions about any of this or want some help, just let me know. I will figure out a way to either make video tutorials for you, or definitely get the information to you that I think will help.
 
Last edited:

Top