Announcement

Collapse
No announcement yet.

Is there a way to block people coming from a certain url?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a way to block people coming from a certain url?

    I need to block a certain url, where anybody coming from it is rejected as registrant or is returned with an error message.

    Anybody know any other security measures I can add to decrease an attack by another forum? They just login with dynamic ips and I can't keep up with banner the names. I know I can make it so nobody new can register, but that is sorta a last resort. Right now my forum is down, and I have just emailed 6 people from their emails VB stores requesting them to be moderators. Im going to ban the ips that I know are the ones that are attacking (from looking at their posts and the time they registered) Then I'm going to train my 6 new mods so they know how to delete posts and ban people. Then I was planning on opening my forum back up again for new registrants.

    Does this sound like a good plan? Can you see any holes?

    I know for a fact that the people I am giving mod statis to can be trusted. At least trusted enough until this dumb "war" is over. I simply banned one of the other forums user for having an offensive sig, and then he gets his forum with something like 23000 registered members to come and cause choas on my board.

    Any help anybody can provide will be benifishal (sp?)

    Thanks a bunch!!

  • #2
    This is by no means fool proof, as it will only block attempts to connect to your site coming directly from the other site, but it's a start.

    If you want to block links coming from example.com then add this line to the top of the global.php file:

    PHP Code:
    if (stristr($HTTP_REFERER,"example.com")) {
        exit;

    Comment


    • #3
      In fact, you might want to try this:
      PHP Code:
      if (stristr($HTTP_REFERER,"example.com")) {
          
      setcookie("noaccess",1,time()+3600,"/");
          exit;
      }
      if (
      $HTTP_COOKIE_VARS['noaccess']) {
          exit;

      I think that will work, but no guarrantees.
      Last edited by Kier; Thu 23 Aug '01, 7:43pm.

      Comment


      • #4
        .htaccess

        Deny remote hosts or IP to your website

        For to deny host or IP addresses access to your site.
        Put a file named .htaccess in the main directory you want to deny for access to your site.
        Use a space for every host or IP you want to deny.

        To deny remote hosts

        <files "*.*">
        Deny from .mil .gov .pol 195.12.13.156 microsoft.com 195.12.11.
        </files>


        To deny all remote hosts

        <files "*.*">
        Deny from All
        </files>


        Allow remote hosts or IP to your website

        For to allow host or IP addresses access to your site.
        Put a file named .htaccess in the main directory you want to allow for access to your site.
        Use a space for every host or IP you want to allow.

        First deny all remote hosts

        <files "*.*">
        Deny from All
        </files>

        Then allow the remote hosts you want to allow access to your site.

        <files "*.*">
        Allow from your.remotehost.com 127.0.0.1 localhost
        </files>

        For to allow all host.

        <files "*.*">
        Allow from All
        </files>

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X