How do I protect my PHP-script from unauthorized access?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gabriel

    How do I protect my PHP-script from unauthorized access?

    Hello everybody.

    I have a question about how to protect my PHP-script from all
    unauthorized access. I have a PHP-script on my web server and this
    PHP-script should only be accessible from _one_ IP-address.

    Right now I am using "$_SERVER['REMOTE_ADDR']" to check if the person
    that wishes to access my PHP-script is authorized or not but I believe
    that this is quite easily circumvented…

    Are there other ways to prevent anyone from accessing my PHP-script
    (except the from the one IP-address that is authorized)?? Is there
    maybe a way to do this with a firewall? I am using Linux on the server
    by the way.

    Kindly
    Gabriel
  • Allodoxaphobia

    #2
    Re: How do I protect my PHP-script from unauthorized access?

    On 8 Jul 2003 04:07:45 -0700, Gabriel hath writ:[color=blue]
    >
    > I have a question about how to protect my PHP-script from all
    > unauthorized access. I have a PHP-script on my web server and this
    > PHP-script should only be accessible from _one_ IP-address.
    >
    > Right now I am using "$_SERVER['REMOTE_ADDR']" to check if the person
    > that wishes to access my PHP-script is authorized or not but I believe
    > that this is quite easily circumvented…
    >
    > Are there other ways to prevent anyone from accessing my PHP-script
    > (except the from the one IP-address that is authorized)?? Is there
    > maybe a way to do this with a firewall? I am using Linux on the server
    > by the way.[/color]

    .htaccess

    |<files special-secret-secure.php>
    |order deny,allow
    |deny from all
    |allow from 999.999.999.999
    |</files>

    Jonesy
    --
    | Marvin L Jones | jonz | W3DHJ | OS/2
    | Gunnison, Colorado | @ | Jonesy | linux __
    | 7,703' -- 2,345m | config.com | DM68mn SK

    Comment

    • Gabriel

      #3
      Re: How do I protect my PHP-script from unauthorized access?

      >[color=blue]
      > .htaccess
      >
      > |<files special-secret-secure.php>
      > |order deny,allow
      > |deny from all
      > |allow from 999.999.999.999
      > |</files>
      >
      > Jonesy[/color]

      That did the trick! Thank you both for your answers. Goldstars will be
      rewarded to you :)

      /Gabriel

      Comment

      • Allodoxaphobia

        #4
        Re: How do I protect my PHP-script from unauthorized access?

        On 9 Jul 2003 10:05:26 -0700, Gabriel hath writ:[color=blue][color=green]
        >>
        >> .htaccess
        >>
        >> |<files special-secret-secure.php>
        >> |order deny,allow
        >> |deny from all
        >> |allow from 999.999.999.999
        >> |</files>
        >>[/color]
        > That did the trick! Thank you both for your answers. Goldstars will be
        > rewarded to you :)
        >
        > /Gabriel[/color]

        It's not often that I am of much help to anyone.
        Kinda brightens my day when I am.
        Glad to help.
        Jonesy
        --
        | Marvin L Jones | jonz | W3DHJ | OS/2
        | Gunnison, Colorado | @ | Jonesy | linux __
        | 7,703' -- 2,345m | config.com | DM68mn SK

        Comment

        Working...