Results 1 to 3 of 3

Thread: Banip from game to FairWall

  1. #1
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts

    Banip from game to FairWall

    ipban.sh:
    Code:
    #!/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:
    Code:
    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:
    Code:
    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

  2. The Following 2 Users Say Thank You to Paho For This Useful Post:

    kubislav23 (17th July 2016),maxdamage99 (17th July 2016)

  3. #2
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    Fairwall xD

  4. #3
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    Fire*

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •