There are several ways to block unwanted IP addresses on Linux Ubuntu. 1. Using iptables: You can use the iptables command to block specific IP addresses. For example, to block an IP address (e.g., 192.168.1.100), you can run the following command: 'sudo iptables -A INPUT -s 192.168.1.100 -j DROP'. This will drop any incoming packets from that IP address. 2. Using ufw (Uncomplicated Firewall): Ubuntu provides a user-friendly interface for configuring the firewall called ufw. You can use the 'ufw' command to block IP addresses. For example, to block an IP address, you can run the following command: 'sudo ufw deny from 192.168.1.100'. This will deny any incoming connections from that IP address. 3. Using fail2ban: fail2ban is a popular software that can monitor log files and automatically block IP addresses based on predefined rules. It is especially useful for protecting against brute-force attacks. You can install fail2ban using the package manager and configure it to block unwanted IP addresses. Remember to consult the official documentation and exercise caution when blocking IP addresses to avoid unintended consequences.