sumit1024
sumit1024

Reputation: 41

How to block outgoing post requests to specific ips

Some Hacker has added Injected JavaScript code on my database which is posting data of users when i view User page . I have already removed his code from database . If I add validation on my Server to fix this security issue of my website , I'll have to make changes in dozens of files , Hence I want to block all post requests from my server to other ip addresses or Please suggest some alternatives way to resolve this security issue . Any Help would be appreciated.

Upvotes: 1

Views: 630

Answers (1)

Jacques KRAMP
Jacques KRAMP

Reputation: 108

The best way would be to block directly from your server, that way no code will even be executed leaving them no chance (if they're using the same ip).

If you're using apache2, you can use the deny operator in your config (more details here)

If you're using nginx, the same operator exists (more details here)

With that being said, you have to be aware that a hacker can change ip very easily the best way is always to stay up to date on security issues, on server as well as in your code.

Upvotes: 1

Related Questions