0

I'm getting a ton of bruteforce attacks today from a domain rather then an IP. I tracked down the websites IP address and blocked it but I am still getting the bruteforce warnings. Can I some how use iptables to block a domain name?

alumni.xjtu.edu.cn
sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
Michael Howey
  • 185
  • 1
  • 8

3 Answers3

2

Use a tool like fail2ban to automatically detect and ban these brute-force login attempts.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
1

Ban 202.117.3.104. This IP has a PTR record (reverse dns) and it resolves to alumni.xjtu.edu.cn. Reverse DNS

FINESEC
  • 1,371
  • 7
  • 8
1

You may want to consider doing a reverse DNS query, then a whois query do determine the network block and finally just drop the whole network block.

Commands:

host alumni.xjtu.cn
alumni.xjtu.edu.cn has address 202.117.3.104

whois 202.117.3.104
inetnum:        202.117.0.0 - 202.117.63.255
netname:        XJTU-CN
descr:          Xian Jiaotong University
descr:          Xian
descr:          Shanxi Province
...

iptables -A INPUT -p tcp --source 202.117.0.0/17 -j DROP

No more TCP connections from the whole university.

krugger
  • 411
  • 2
  • 4