This post is to describe how to configure the firewall in
Linux machine. This post tells how to enable or disable the firewall.
1.
To check the status of firewall write following
command in a terminal
User# sudo ufw status.
2.
To disable the firewall write following command in a terminal
User# sudo ufw disable
3.
To enable the firewall write following command
in a terminal
User#sudo ufw enable
4.
To enable or disable specific servicees(like SSH
)in firewall write following command in a terminal
User# sudo ufw allow ssh (to
allow SSH service)
User#sudo ufw block ssh (to block SSH service)
5.
To allow or block to specific port on firewall write
following command in a terminal
User#sudo ufw allow 53 (allow
access to port number 53)
user#sudo ufw block 53(block
access to port number 53)
6.
If you want to configure firewall in ubuntu
without using terminal then you can also install gufw.
Install gufw
click this link