Boas..

 

só hoje me deparei que não existe mais opcão de digitar IP poublico bloco para criar uma lista CGNAT ?????? poderiam informar porque só mostra 1 bloco ?

 

9782098284?profile=RESIZE_710x9782098663?profile=RESIZE_710x

 

 

dá pra ver a diferenca ao tentar editar os 2 ???????? qual é a novidade que não está presente nos changelogs ?

 

 

Histórico de atualizações e modificações efetuadas:

Versão 21.06

- Alterações para conformidade com algumas regras da LGPD.

Versão 21.05

- Geração arquivo anatel DICI.
- Removido Gerar XML para sici.

Versão 21.04

- Integração Bolix.
- Removido teste de velocidade.

Versão 21.03

- Integração com aplicativo traccar SMS.
- Removido Bate-Papo.
- Controle de pool com CGNAT.

 

°° // ***

  |__| 

Para adicionar comentários, você deve ser membro de MK-AUTH.

Join MK-AUTH

Enviar-me um email quando as pessoas responderem –

Respostas

  • a_ipv4(finall) == false) {
    jQuery('#msg_total_range').html('<span class="is-size-6 has-text-danger">ip final invalido.</span>');
    return false;
    }

    test1_inicial = iniciall.substring(0, 3);
    test1_final = finall.substring(0, 3);

    if (test1_inicial != test1_final) {
    jQuery('#msg_total_range').html('<span class="is-size-6 has-text-danger">ips fora de range</span>');
    return false;
    }

    if (test1_inicial == '192' || test1_inicial == '100') {
    test2_inicial = ip2long(iniciall);

    if (test1_inicial == '192') {
    if (test2_inicial < 3232235520 || test2_inicial > 3232301055) {
    jQuery('#msg_total_range').html('<span class="is-size-6 has-text-danger">ip inicial do range fora da faixa 192.168.0.0 / 192.168.255.255</span>');
    return false;
    }
    }

    if (test1_inicial == '100') {
    if (test2_inicial < 1681915904 || test2_inicial > 1686110207) {
    jQuery('#msg_total_range').html('<span class="is-size-6 has-text-danger">ip inicial do range fora da faixa 100.64.0.0 / 100.127.255.255</span>');
    return false;
    }
    }

    } else {
    // ip invalido
    jQuery('#msg_total_range').html('<span class="is-size-6 has-text-danger">ip inicial invalido: ' + iniciall + '</span>');
    return false;
    }

    if (test1_final == '192' || test1_final == '100') {
    test2_final = ip2long(finall);

    if (test1_final == '192') {
    if (test2_final < 3232235520 || test2_final > 3232301055) {
    jQuery('#msg_total_range').html('<span class="is-size-6 has-text-danger">ip final do range fora da faixa 192.168.0.0 / 192.168.255.255</span>');
    return false;
    }
    }

    if (test1_final == '100') {
    if (test2_final < 1681915904 || test2_final > 1686110207) {
    jQuery('#msg_total_range').html('<span class="is-size-6 has-text-danger">ip final do range fora da faixa 100.64.0.0 / 100.127.255.255</span>');
    return false;
    }
    }

    } else {
    // ip invalido
    jQuery('#msg_total_range').html('<span class="is-size-6 has-text-danger">ip final invalido: ' + finall + '</span>');
    return false;
    }

    return (test2_final+1)-test2_inicial;
    };

    var ips_somar = [];
    ips_somar[20] = 4096;
    ips_somar[21] = 2048;
    ips_somar[22] = 1024;
    ips_somar[23] = 512;
    ips_somar[24] = 256;
    ips_somar[25] = 128;
    ips_somar[26] = 64;
    ips_somar[27] = 32;
    ips_somar[28] = 16;
    ips_somar[29] = 8;
    ips_somar[30] = 4;
    ips_somar[31] = 3;

    gen_ip_final = function(ip_valido, mask_valido) {
    jQuery('#msg_conf_final').html('<span class="is-size-6 has-text-info">Rede de classe /' + mask_valido + '</span>');

    if (valida_ipv4(ip_valido) == true) {
    ip_valido = ip2long(ip_valido);

    ip_network = ip_valido - 1;
    ip_broadcast = ip_network + (ips_somar[mask_valido] - 1);
    ip_final = ip_broadcast - 1;

    ip_network = long2ip(ip_network);
    ip_final = long2ip(ip_final);
    ip_broadcast = long2ip(ip_broadcast);

    jQuery("#ip_final").val(ip_final);
    jQuery("#msg_ip_final").html(ip_final);
    jQuery("#network_broadcast").html(ip_network + '/' + ip_broadcast);
    } else {
    jQuery('#msg_conf_final').html('<span class="is-size-6 has-text-danger">Endereco ip invalido.</span>');
    return false;
    }
    };

    jQuery("#range_cgnat").change(function() {
    jQuery('#btn_gravar_cgnat').attr('disabled', true);

    cgnat_range = jQuery("#range_cgnat").val();
    cgnat_range = cgnat_range.split('-');
    total_range = totalRange(cgnat_range[0],cgnat_range[1]);
    if (total_range) {
    jQuery("#total_range").val(total_range);
    jQuery('#msg_total_range').html('<span class="is-size-6 has-text-info">Range com ' + total_range + ' hosts no total.</span>');
    }
    });

    jQuery("#ip_valido").change(function() {
    ip_valido = jQuery("#ip_valido").val();
    mask_valido = jQuery("#mask_valido").val();

    jQuery('#btn_gravar_cgnat').attr('disabled', true);
    gen_ip_final(ip_valido, mask_valido);
    });

    jQuery("#mask_valido").change(function() {
    ip_valido = jQuery("#ip_valido").val();
    mask_valido = jQuery("#mask_valido").val();

    jQuery('#btn_gravar_cgnat').attr('disabled', true);
    gen_ip_final(ip_valido, mask_valido);
    });

    jQuery("#btn_calcular_cgnat").click(function() {
    jQuery('#btn_gravar_cgnat').attr('disabled', true);

    ip_valido = jQuery("#ip_valido").val();
    mask_valido = jQuery("#mask_valido").val();
    total_validos = ips_somar[mask_valido]-2;
    total_ips = jQuery("#total_range").val();

    if (total_ips) {
    if ((total_ips/128) > total_validos) {
    jQuery('#msg_conf_final').html('<span class="is-size-6 has-text-danger">Range com ' + total_ips + ' hosts, total alto para ' + total_validos + ' ips validos. Use range com no maximo ' + (total_validos*128) + ' ips.');
    } else {
    if (gen_ip_final(ip_valido, mask_valido) != false) {
    jQuery('#btn_gravar_cgnat').removeAttr('disabled');
    jQuery('#msg_conf_final').html('<span class="is-size-6 has-text-success">Total de ips no range compativel com o numero de ips validos.</span>');
    } else {
    jQuery('#msg_conf_final').html('<span class="is-size-6 has-text-danger">Ip valido configurado errado.</span>');
    }
    }
    }
    });

     

  • tem que colocar apenas o ip inicial e a mascara, o sistema coloca o ip final sozinho...

This reply was deleted.