Welcome! Log In Create A New Profile

Advanced

Passing an IP to peerblock from another application for example Apache?

Posted by Anonymous User 
Hello,

I hope that this subject doesn't exist anywhere but I could not find anything similar in the forum or faq.

I wonder if there is a solution to pass an IP or IP-Range to the Peerblock process so its added to an active list life in runtime?

If my Apache or some other processes of mine experience a flooding attack for example in form of too many connections, I would like to add that IP to the black list automatically.

Is there an interface or way to realize that?
Or maybe someone has an idea?

Thanks in advance and have a nice day.
Re: Passing an IP to peerblock from another application for example Apache?
June 30, 2012 12:05PM
avatar
The C API to make PeerBlock reload it's lists is

UINT msg=RegisterWindowMessage(_T("PeerBlockLoadLists"));
SendMessage(HWND_BROADCAST, msg, 0, 0);

Not sure how that would work in php or python though.


If you create a list in PeerBlock, you can call the send message to pickup the changes.

The p2p format has a name:start_ip-end_ip on each line e.g.

Flooding:70.0.0.0-80.0.0.0


You other program will need to add to the list file and possibly remove ranges as well.
thanks for the API string, I'll see if I can integrate it into my perl script that scans apache logs and generates/appends to the PeerBlock list. (shared today) The API will be useful winking smiley
Sorry, only registered users may post in this forum.

Click here to login