I have a website running on a server with Nginx. I am trying to deny outgoing packages to a specific IP address, to make some tests. I am using UFW.
I know the ordering issue, and I blocked the ip address by inserting it to 1.
sudo ufw insert 1 deny out from any to 11.22.33.44
systemctl restart ufw
Before writing these commands, I could ping the ip 11.22.33.44(symbolic), after the command I can't ping it.(Operation not permitted errors are seen on the screen)
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
But I can still access my website without any problem.
How can I block my server to send packets to the IP (and hopefully a specific port)?
I don't want my server to send packets to the client, but client can send me requests.
Aucun commentaire:
Enregistrer un commentaire