SOC Experts Community - Beta
0 like 0 dislike
in Networking by (5.9k points)

1 Answer

1 like 0 dislike
by (2k points)

There are two basic tools that can be used in Ubuntu or any Linux

  1. UFW (Uncomplicated Firewall)
  • For Beginners
  • Easy to use
     Syntax :
  • sudo ufw allow [port]/[tcp or udp] (to enable / allow access) OR
  • sudo ufw allow [protocol] (protocols like http,https,ftp etc)
     Use DENY instead of allow to disable

   2. iptables

  • For advanced users (pros)
  • Complicated to use
     Syntax :
  • iptables -I INPUT -p [tcp or udp] --dport [port] -j ACCEPT (to enable / accept connections to a port)
  • iptables -I INPUT -p [tcp or udp] --dport [port] -j REJECT (to disable / deny connections to a port)
Refer to MAN pages for more information

SOC Experts - No. 1 Job Oriented Cybersecurity Training Program

View our Courses