New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to run a script when receiving an email (OVH Anti-DDoS)?
This month I have been receiving small DDoS attacks (15-30 minutes).
I would like to be able to run an .sh when I receive an email from OVH warning about mitigation.
The script simply stops a service and starts it again in another IP previously enabled.
Any idea is welcome
Comments
fuck knows mate.
Have you considered taking up a support position over at
In "/etc/aliases" add
Assuming he runs his own mail server...
Alternatively you can use services such as Zapier.
Ex:
When you receive email on Gmail account from OVH anti-ddos, trigger webhook with secret, webhook will execute script
Doesn't OVH provide an API for their DDoS that can run a webhook upon attack?
Nice one! Not sure if they support webhooks, but at least you can poll: http://docs.ovh.ca/en/api-antiddos.html. Swagger docs: https://eu.api.ovh.com/console/#/ip/{ip}/mitigation#GET
no, they don't have any way to notify when an attack is detected.
wait? Is not OVH sent such email by default?
Just create a script to poll their API every 30 seconds or so. Check if state is any different from last time, save new state, repeat. Fire an event (e.g. call a webhook) in case state has changed.
Yeah, that's different from an API sending a notification though.
Or spend an hour learning procmail. procmail is the swiss army knife of handling incoming mail. You don't necessarily need to run the mail server (you don't have to be root to write procmail recipes for yourself) but it has to be on the mail server, not gmail or something.
Alternatively, look at IFTTT
Hasn't been active since 2013, but let's try...
@fuck can you help in this thread?
He don't give a @fuck
OVH has a fat API, just ASK IT, it will respond.
Thank you all!
I'll try to develop something and I'll share it, just in case it could be useful for someone else here.
Again, thank you guys