6 Replies Latest reply on Aug 17, 2007 1:05 PM by Newsgroup_User

    I want to block specific IP addresses

    matthew stuart Level 2
      Hi all, I need to be able to block a specific IP address from accessing a clients website basically because my client has found that one of their competitors has been stealing content from their site without even rewriting the content!!

      The server is a windows server, and it is part of a shared server, so I only want to ensure that it affects my clients websites rather than any other site that my reside on the same server. The IP address I want to block is from a company has has it's own dedicated servers, so I won't be affecting a whole range of people, just the naughty ones...

      I have this:

      <Limit GET>
      order deny,allow
      deny from 209.23.123.110
      </Limit>

      However, I don't know how to implement it! Is it even suitable for windows?

      If it is suitable for windows, do I just drop it in to each page (if so, where), or do I have to create some extra file on the server in order for it to work? What do I have to do?

      I know this is an extreme thing to do, but it is costing my client money through lost revenue and man hours due to the effort he is expending while creating content just so the competitor can plagiarize it. I am aware that they may end up logging on from elsewhere, but anything that makes their life a lttle more complicated can only be a bonus.

      Thanks

      Mat
        • 1. Re: I want to block specific IP addresses
          Level 7
          Does the server support serversite scripting languages?
          If so then it may well be ASP. If that's the case then you could try the
          following:

          <%If Request.ServerVariables("REMOTE_ADDR") = "000.000.000.00" Then
          Response.End()%>
          or
          <%If Request.ServerVariables("REMOTE_ADDR") = "000.000.000.00" Then
          Response.Redirect("someURL")%>

          Obviously change the 000.000.000.00 to the correct IP


          • 2. Re: I want to block specific IP addresses
            matthew stuart Level 2
            Yes, it is ASP and I like the idea of the redirect, I could put the rudest comment there couldn't I. Best not to just in case somebody innocent stumbles across it.

            So, I am assuming then that this goes just below <%@LANGUAGE= and just before the connections file include.

            In order for me to block several IP addresses, would I do it like this:
            "000.000.000.00,000.000.000.00"

            or like this:
            "000.000.000.00" "000.000.000.00"

            Excellent, thanks.

            Mat
            • 3. Re: I want to block specific IP addresses
              Level 7
              By the way, be aware that unless the individual has a static IP address
              (most don't), your block may well not work.

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.dreamweavermx-templates.com - Template Triage!
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
              ==================


              "matthew stuart" <webforumsuser@macromedia.com> wrote in message
              news:fa43vj$i1n$1@forums.macromedia.com...
              > Yes, it is ASP and I like the idea of the redirect, I could put the rudest
              > comment there couldn't I. Best not to just in case somebody innocent
              > stumbles
              > across it.
              >
              > So, I am assuming then that this goes just below <%@LANGUAGE= and just
              > before
              > the connections file include.
              >
              > In order for me to block several IP addresses, would I do it like this:
              > "000.000.000.00,000.000.000.00"
              >
              > or like this:
              > "000.000.000.00" "000.000.000.00"
              >
              > Excellent, thanks.
              >
              > Mat
              >


              • 4. Re: I want to block specific IP addresses
                Level 7
                Indeed it goes after the <%@LANGUAGE.........
                You can put it anywhere you like (as long as it's above the html), though it
                makes sense to put it above everything else.

                Regarding blocking several, then you can do this several ways. If it's just
                a few then use the "OR" logical oporator:

                varRemoteIP = Request.ServerVariables("REMOTE_ADDR")
                If (varRemoteIP = "000.000.000.00") OR (varRemoteIP = "000.000.000.00") Then
                doSomething

                If you have stack loads of then then put them into an array

                <%
                ' define the array
                Dim myIPArray(3), Remote IP
                ' get the remote IP
                RemoteIP = Request.ServerVariables("REMOTE_ADDR")
                ' write the array
                myIPArray(0)="000.000.000.00"
                myIPArray(1)="000.000.000.01"
                myIPArray(3)="000.000.000.02"
                ' loop and work the array
                For i=o to ubound(myIPArray)
                If RemoteIP = myIPArray(i) Then doSomething
                Next
                %>
                Note in the above exampe you need to define the umber of items in the array
                (in this case 3)

                or

                <%
                Dim myIPList, myIPArray, RemoteIP
                ' comma delimited list
                myIPList = "000.000.000.00,000.000.000.01,000.000.000.02"
                ' split the list into an array
                myIPArray = Split(myIPList,",")
                ' get the remote IP
                RemoteIP = Request.ServerVariables("REMOTE_ADDR")
                ' loop and work the array
                For i=o to ubound(myIPArray)
                If RemoteIP = myIPArray(i) Then doSomething
                Next
                %>


                • 5. Re: I want to block specific IP addresses
                  Level 7
                  Do take note of Murray's very valid point


                  • 6. Re: I want to block specific IP addresses
                    Level 7
                    On 17 Aug 2007 in macromedia.dreamweaver, matthew stuart wrote:

                    > Hi all, I need to be able to block a specific IP address from
                    > accessing a clients website basically because my client has found
                    > that one of their competitors has been stealing content from their
                    > site without even rewriting the content!!

                    You can block all the IPs[1] you want. It's virtually impossible to
                    protect IP[2] that way. This is a better one for you client's lawyer.
                    As a first step, though, have your client write to the competitor's
                    hosting provider, pointing out the theft of copyrighted material.

                    http://www.jamesshuggins.com/h/web1/how_do_i_stop_downloading.htm

                    [1] Internet Protocol address
                    [2] Intellectual Property

                    --
                    Joe Makowiec
                    http://makowiec.net/
                    Email: http://makowiec.net/contact.php