News

Vallumd: Tool to Centralize or Distribute IPset Blacklists

If you maintain a server on the Internet, it’s very expected that you encounter one or more brute force attacks. Not a problem, just install fail2ban. But if you’re running multiple servers, each of them running their fail2ban instance, they’ll all have unlike IP addresses in the ban list. Wouldn’t it be pleasant to have a mutual ban list across all your fail2ban instances? Or in case all your machines are behind a router or firewall you manage yourself, wouldn’t it be good to drop malicious traffic at the edge of your network? That’s exactly what vallumd assists to accomplish.  The name vallumd comes from the Latin word “vallum”, which means wall. And that’s what vallumd does: build a wall to protect your digital empire.


Usage

To use vallumd, you need an MQTT broker, like Mosquitto. Depending on your setup, you can run it on the same host that runs vallumd, but that’s no requirement. The next thing you need is an IPset. To give you full control over the type of IPset and its options, vallumd will not create the IPset itself. You can choose between these IPset types:

  • bitmap:ip
  • bitmap:net
  • hash:ip
  • hash:net

IPset creation example: ipset create blacklist hash:ip timeout 3600
Starting vallumd: vallumd -h 192.168.0.1 -t blacklist

This will listen for messages on the MQTT broker at 192.168.0.1, in the blacklist topic, and when a message is received, the IP address in the message will be added to or remove from the IPset named blacklist. So now we have everything in place to start adding IPs to the blacklist. All we have to do is configure our IDS, IPS or Honeypot to send malicious IP addresses to our MQTT broker.  For fail2ban, this could be done with the Mosquitto client mosquitto_pub. Create a new action in /etc/fail2ban/action.d/vallumd.conf:

[Definition]
actionban = mosquitto_pub -h 192.168.0.1 -q 2 -t blacklist/add -m <ip>actionunban = mosquitto_pub -h 192.168.0.1 -q 2 -t blacklist/del -m <ip>

And configure your fail2ban jails to use the vallumd action.


Vallumd: Tool to Centralize or Distribute IPset Blacklists Reviewed by Ali Dharani on 12:42 AM Rating: 5

No comments:

Feel free to ask questions, we love to respond.

All Rights Reserved by The World of IT & Cyber Security: ehacking.net © 2014 - 2015
Powered By Blogger, Designed by Sweetheme

Contact Form

Name

Email *

Message *

Powered by Blogger.