# Block emails and any inbound connection from an IP

You can block inbound connections from a specific IP address using UFW.

ufw insert 1 deny 1.2.3.4*

*where 1.2.3.4 is the Ip you want to block

Repeat this command for every individual IP address you want to block. to

To view which IPs are blocked on a server, run:

ufw status