vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   DNSBL/Open Proxy-Blocking (https://vborg.vbsupport.ru/showthread.php?t=96318)

eoc_Jason 10-12-2005 02:12 PM

I think one major thing that needs to be addressed is a low "timeout", incase a RBL becomes un-responsive. I've been so busy I haven't had a chance to look into that yet, but I know there is a PHP variable somewhere. Also there might be a better method than using the gethostbyname function, not sure.

NuclioN 10-12-2005 09:25 PM

We've installed this as a product now and hope it's working. Are there things to do after the install such as update a blacklist somewhere?

ImportPassion 10-12-2005 09:47 PM

i had to disable this. It was causing major lag on my site.

webspider 10-12-2005 09:59 PM

I was not having a lag at all but I did find a high ratio of false positives.

C_P 10-13-2005 01:20 AM

Quote:

Originally Posted by webspider
I was not having a lag at all but I did find a high ratio of false positives.

DITTO here.

eoc_Jason 10-13-2005 02:46 PM

Which list were the false positives coming from? I usualy found most were coming from CBL, which I disabled that code in mine. There were IPs that were last checked / listed many, many months ago. Which you would *think* would get de-listed over time, but they wern't.

Perhaps the actual checking code should be a shutdown query, as to not lag the end-user. Then the regular check against the session table can be where it currently is.

ImportPassion 10-13-2005 02:52 PM

is there a way to just do this for new users registering?

C_P 10-13-2005 03:44 PM

Quote:

Originally Posted by eoc_Jason
Which list were the false positives coming from? I usualy found most were coming from CBL, which I disabled that code in mine. There were IPs that were last checked / listed many, many months ago. Which you would *think* would get de-listed over time, but they wern't.

Perhaps the actual checking code should be a shutdown query, as to not lag the end-user. Then the regular check against the session table can be where it currently is.

eoc_Jason I used your plug in and not the one in first thread.
It rejected connections from "GoBigWest" and "Dialup.cc". Both ISPs use Level3 numbers.

Rejected IPs were

IP Address: 4.250.177.131
Hostname: dialup-4.250.177.131.Dial1.Weehawken1.Level3.net

IP Address: 4.250.138.133
Hostname: dialup-4.250.138.133.Dial1.Weehawken1.Level3.net

The Spamhaus website said that the IP's weren't listed, but other whois sites were able to correctly identify them as Level3.

skydancer 10-16-2005 11:07 PM

Quote:

Originally Posted by 7thgenCivic.Com
is there a way to just do this for new users registering?

Yes, just edit the plugin and add at the top:

if (THIS_SCRIPT=='register') {

and at the bottom:

}

cnutter 10-17-2005 01:27 AM

Quote:

Originally Posted by skydancer
Yes, just edit the plugin and add at the top:

if (THIS_SCRIPT=='register') {

and at the bottom:

}


Skydance so it should look like this if we only one it to check users as they register on a site?
Code:

if (THIS_SCRIPT=='register') {

if ($vbulletin->session->vars['OPM'] == 0) {
    OPM_proxy_check(IPADDRESS);
}

if ($vbulletin->session->vars['OPM'] == 2) {
    // parse some global templates
    eval('$gobutton = "' . fetch_template('gobutton') . '";');
    eval('$spacer_open = "' . fetch_template('spacer_open') . '";');
    eval('$spacer_close = "' . fetch_template('spacer_close') . '";');
    eval('$headinclude = "' . fetch_template('headinclude') . '";');
    eval('$header = "' . fetch_template('header') . '";');
    eval('$footer = "' . fetch_template('footer') . '";');

    eval(standard_error(fetch_error('OPM_Deny',IPADDRESS)));
}


function OPM_proxy_check($OPMremote) {
    global $vbulletin, $db;

    $cleaned['sessionhash'] = "'" . $db->escape_string($vbulletin->session->vars['dbsessionhash']) . "'";

    $OPMlist = array(
        "xbl.spamhaus.org" => array(4,5,6)
        );


    $OPMreverse = implode('.',array_reverse(explode('.',$OPMremote)));

    foreach ($OPMlist as $OPMhost => $OPMcodes) {
        $OPMresult = explode('.',gethostbyname($OPMreverse.".".$OPMhost));

        if($OPMresult[0] = 127 && in_array($OPMresult[3],$OPMcodes)) {
            $db->query_write("
                UPDATE " . TABLE_PREFIX . "session
                SET OPM = 2
                WHERE " . TABLE_PREFIX . "sessionhash = $cleaned[sessionhash]
                LIMIT 1
            ");
            $vbulletin->session->vars['OPM'] = 2;
            break;
        }
    }

    if ($vbulletin->session->vars['OPM'] == 0) {
        // This IP is okay for this session
        $db->query_write("
            UPDATE " . TABLE_PREFIX . "session
            SET OPM = 1
            WHERE " . TABLE_PREFIX . "sessionhash = $cleaned[sessionhash]
            LIMIT 1
        ");
    }

    return;
}
}



All times are GMT. The time now is 08:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01146 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete