简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM