PDA

View Full Version : Banip from game to FairWall



Paho
17th July 2016, 11:39
ipban.sh:

#!/bin/sh
#Add ./ipban.sh to Scheduler every one minute(*/1)
iptables -D INPUT -j IPBAN
iptables -F IPBAN
iptables -X IPBAN
iptables -N IPBAN
iptables -A INPUT -j IPBAN
cat fs_homepath/banip.txt | xargs -I {IP} iptables -A IPBAN -s {IP} -j DROP
where fs_homepath for example: root/cod2
when give ban:

filename = getCvar("fs_homepath")+"/banip.txt";
file = fopen(filename, "w");
fwrite(file,self getIP()+"\n");
fclose(file);
or SELECT banips in DataBase to array every new map - Callback_StartGameType()
array add to banip.txt
before write to .txt need delete .txt:

system("rm -rf getCvar("fs_homepath")+"/banip.txt");//delete file
This way full ban to status server/ispmanager/shell/root/url... and etc.
many ideas

YuriJurek
17th July 2016, 16:17
Fairwall :D xD

Paho
17th July 2016, 16:48
Fire*:eek: