July 2018
Beginner
264 pages
8h 9m
English
Now, we are going to see some of the iptables commands:
$ sudo iptables -L
$ sudo iptables -A INPUT -p tcp --dport 4321 -j ACCEPT
This rule will allow incoming traffic from port 4321. The firewall needs to be restarted to make this rule effective.
Using iptables, you can block the incoming traffic. For that, run the following command:
$ sudo iptables -A INPUT -j DROP
Read now
Unlock full access