The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SecFilterSelective HTTP_User-Agent

Discussion in 'General Discussion' started by dan.andrus, Aug 29, 2006.

  1. dan.andrus

    dan.andrus Member

    Joined:
    Jun 30, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Hi all

    One of our clients has implemented a payment system with 2checkout.
    Our logs indicate that are receiving a "403 - Forbidden" error notice when
    attempting to access this page. This is most likely because in the case of
    direct return, HTTP_USER_AGENT is identified as:

    "2Checkout.com-purchase libwww-perl/5.800"

    I implemented the following in httpd.conf but still doesn't works.

    SecFilterSelective HTTP_User-Agent "("2Checkout.com-purchase libwww-perl/5.800)" allow


    Thank you very much
     
  2. jsnape

    jsnape Well-Known Member

    Joined:
    Mar 11, 2002
    Messages:
    174
    Likes Received:
    0
    Trophy Points:
    16
    This syntax example *might* help. I just happened to have it open

    # Only allow our own test utility to send requests (or Mozilla)
    SecFilterSelective HTTP_USER_AGENT "!(mod_security|mozilla)"
     
  3. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
  4. dan.andrus

    dan.andrus Member

    Joined:
    Jun 30, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Thanks all..finally i got it solved...had to remove libwhisker from
    SecFilterSelective HTTP_User-Agent "(libwhisker|paros|wget|libwww|perl|curl)"

    Hopefully nothing will go wrong as i don't exactly now what libwhisker does...
     
  5. dan.andrus

    dan.andrus Member

    Joined:
    Jun 30, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Got the same problem with another domain

    "POST /../.../script.php HTTP/1.1 "403 - "-" "libwww-perl/5.65" in error log

    I could disable perl and libwww in
    SecFilterSelective HTTP_User-Agent "(libwhisker|paros|wget|libwww|perl|curl)"
    but i don't hnow how wise it is...

    What do u mean by "try delimiting the full stops with \"? an example pls...

    Thanks again
     
  6. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    SecFilterSelective HTTP_User-Agent "("2Checkout\.com-purchase libwww-perl\/5\.800)" allow
    (as an example of the delimiting)

    I dont think you need the brackets for a single string.
    SecFilterSelective HTTP_User-Agent "2Checkout\.com-purchase libwww-perl\/5\.800" allow

    should do the trick, if that string is going to work
     
  7. dan.andrus

    dan.andrus Member

    Joined:
    Jun 30, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1

    thanx a lot nickp666, that solved the problem
     

Share This Page