Results 1 to 1 of 1

Thread: ban

  1. #1
    ... connecting
    Join Date
    Jan 2023
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ban

    Hello guys finally i made it here xd, so wanna ask you something about banning throw putty i'm not good enough that's why i'm here you guys always help me and i appreciate

    so when I want to block ( ban ) someone IP from my server, I use this command
    iptables -A INPUT -s IPHERE -j DROP
    My question here is, It is possible for my admins to use this command somehow without using Putty?
    i have the script already but i don't know where i should add it /rcon iptables -A INPUT -s iphere -j DROP or something like that
    maybe in tdm.gsc idk :/

    PHP Code:
    CodeCallback_CLSpam(typeip)
    {
    CONST_TimesForBan 40;

    sm strtok(type":");
    svc sm[0];
    type sm[1];

    switch (
    svc)
    {

    case 
    "RCON":
    //
    break;

    case 
    "CHALLENGE":
    //
    break;

    case 
    "INFO":
    //
    break;

    case 
    "STATUS":
    if (
    type == "ADRRESS")
    {
    if (!
    isDefined(level.locked_ip[ip]))
    level.locked_ip[ip] = 0;

    level.locked_ip[ip]++;

    if (
    level.locked_ip[ip] >= CONST_TimesForBan)
    {
    //level.locked_ip[ip] = 0;
    ip_without_port strtok(ip":")[0];
    system("iptables -A INPUT -s "+ip_without_port+" -j DROP");
    printf("[CLSpam] IP: "+ip+" banned! Reason: "+type+" [TIMES: "+level.locked_ip[ip]+"]\n");
    level.locked_ip[ip] = 0;
    }
    else
    printf("SVC_Status: global limit\n");

    break;

    default:
    //
    break;

    }


    Last edited by kung foo man; 11th January 2023 at 14:28. Reason: add php tag

Posting Permissions

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