Syntax to block an IP address under Linux
iptables -A INPUT -s IP-ADDRESS -j DROP
Replace IP-ADDRESS with your actual IP address.
For example, if you wish to block an ip address 184.108.40.206 for whatever reason then type the command as follows:
iptables -A INPUT -s 220.127.116.11 -j DROP
If you have IP tables firewall script, add the above rule to your script.
If you just want to block access to one port from an ip 18.104.22.168 to port 25 then type command:
iptables -A INPUT -s 22.214.171.124 -p tcp --destination-port 25 -j DROP
The above rule will drop all packets coming from IP 126.96.36.199 to port mail server port 25.