How to Block Internet Connection Using IPTables Tools
Last updated
Last updated
Iptables is a tool or application that functions as a firewall in the Linux operating system. With iptables, you can manage network traffic on the server such as allowing, blocking or skipping incoming and outgoing connections, managing ports and so on. Iptables is a firewall application that is used by default on various Linux distributions, especially on servers that do not use graphical control panels such as cPanel or Plesk Panel.
Iptables works by reading network traffic and comparing it with a set of rules that have been created. The rules in iptables are in the form of a table consisting of a series of rules or rules called a chain. There are three main tables in Iptables, namely Filter, NAT and Mangle. In this article, we will focus on discussing Filter tables because they are most often used in server operations with the Linux operating system.
nano /etc/proftpd/proftpd.conf
Check the service from the client browser by typing the URL: ftp://IP-Internet
Example : ftp://192.168.91.150
iptables this time aims to block all packets originating from the ip pool 192.168.91.0/24
iptables this time aims to block all packets originating from the Debian 10- Router's ens33 interface
iptables this time aims to block all packets that will be sent to our local IP, namely 11.1.25.0/24
iptables this time aims to block all packets that will be sent to the Debian 10- Router's ens36 interface
Port 21
iptables this time aims to block all packets that will be sent to port 21 (FTP's default port) on the Debian 10- Router
To check whether port 21 has been blocked or not, you can check by going to Windows-Client then browsing to the Debian 10-Router's FTP service address by doing
iptables this time aims to block all packets that will be sent to port 22 (SSH's default port) on the Debian 10- Router
To check whether port 22 has been blocked or not, you can check by going to Windows-Client then SSH using putty/cmd to the Debian 10-Router by doing
iptables this time aims to block ping packets that will be sent to the Debian 10- Router's ens33
To check whether the firewall blocking pings has been successful or not, you can check by going to Windows-Client then pinging the Debian 10-Router's Internet IP using this method.
iptables this time aims to reject ping packets that will be sent to the Debian 10- Router's ens33
To check whether the firewall rejecting the ping packet has been successful or not, you can check by going to Windows-Client then pinging the Debian 10-Router's Internet IP using this method.