Skip to content

Checks the OVH API to see if an IP address is in forced mitigation mode and sends Discord alerts.

License

Notifications You must be signed in to change notification settings

Courvix-Network/OVH-DDoS-Alerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OVH DDoS Alerts

Checks the OVH API to see if an IP address is in forced mitigation mode and sends Discord alerts.

P.S. This is the first thing that I wrote in NodeJS - improvements to the code via pull requests are encouraged.

About

  • Made by Courvix for the Courvix Network
  • Instagram: courvixnetwork
  • Email: contact@courvix.com
  • GitHub: Courvix
  • GitLab: Courvix

Requirements:

  • phin - used for as a http lib to send request to discord webhook
  • chalk - used for easier text colors lol
  • ovh - ovh's own lib for their api functions, includes auto json parsing
  • net - for ip validation
npm i phin
npm i chalk
npm i ovh

Or just npm i to install all the dependencies in package.json

How to Use:

  1. Install the requirements mentioned above
  2. Generate OVH API tokens with their pages

You'll want to grant a GET request to the following OVH API URL: /ip/{ipBlock}/mitigation/{ipAddr}. If you are checking an IP address belonging to a failover IP block purchased from OVH, then you'll want to specify the ipBlock as something like 198.98.0.0/24 for example. If you're checking a single regular IP address, then both ipBlock and ipAddr can be the same (your server's IP address.)

Further documentation on the /ip/{ipBlock}/mitigation/{ipAddr} API endpoint can be found on OVH's API documentation page here: https://api.ovh.com/console/#/ip/{ip}/mitigation/{ipOnMitigation}#GET

  1. Use the keys generated and configure them in config.json where it says appKey, appSecret, and consumerKey
  2. Customize anything else
  3. Run the checker

NOTE

When running the checker, remember about ipBlock and ipAddr. If you're checking a regular single IP address, you'll need to specify that IP as both the IP Block and IP Address, whereas a failover IP block will be like node checker 192.98.0.0/24 192.98.0.30.

About

Checks the OVH API to see if an IP address is in forced mitigation mode and sends Discord alerts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published