MI Sabic
MI Sabic

Reputation: 387

How to be safe from IP address hacking

I'm trying to make a website. I want to be safe from 'IP address hacking'.

Is there any full proof way to be safe from IP address hacking by php?
How can i hide my server's IP address by php?

Upvotes: 0

Views: 299

Answers (1)

Stephen C
Stephen C

Reputation: 719238

Is there a [fool-proof] way to be safe from IP address hacking by php?

No1. The same applies to other web server technologies as well.

However, if you follow "best practice" for securing your PHP site, you should be relatively safe. In this case, "best practice" would include:

  • Making sure that you following the relevant advice on how to write secure PHP code.

  • Applying all relevant security patches in a timely fashion.

  • Avoiding complication 3rd-party applications, libraries, plugins, etc that have a dubious record as far as security is concerned ... or that are old and/or poorly maintained.

But I'm not a PHP developer / security expert. I suggest you Google for articles on securing PHP ... or buy a book.

How can i hide my server's IP address by php?

You can't.

If you want your server's IP address to be hidden, that has to be implemented at the networking level. The most obvious way to hide the IP address is to change it to a private IP address; i.e. an address in one of the ranges listed here:

Another way to do it would be to put it behind a firewall that blocked incoming traffic; e.g. TCP connects.

HOWEVER, if you hide your server's IP address using a firewall or a private IP address, that means that external clients (for whom the IP is hidden) won't be able to use your server (directly).

A final option would be to implement a "reverse proxy" between your server and the clients. HTTP requests sent to the reverse proxy are then relayed to the server the responses are passed back. Note that the IP address of the reverse proxy cannot be hidden ... for the reasons given above.


1 - Actually there is one way. Disconnect the server from all networks! Unfortunately, that defeats the purpose of implementing a web server in the first place ...

Upvotes: 1

Related Questions