Skip to content

Instantly share code, notes, and snippets.

View benevo's full-sized avatar
🍇

Ferris Bueller benevo

🍇
View GitHub Profile
@benevo
benevo / example.cpp
Created October 24, 2018 07:16 — forked from jmk/example.cpp
Example of showing different context menu for items in a QTreeWidget
#include "main.h"
int main(int argc, char** argv)
{
QApplication app(argc, argv);
MyTreeWidget w;
w.show();
@benevo
benevo / ddos.conf
Created March 30, 2018 05:13 — forked from mattia-beta/ddos.conf
IPtables DDoS Protection for VPS
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###