How To Install And Configure The Firewall In Kali Linux

In this tutorial we are going to learn how to install the package of firewall and how to configure the firewall of kali linux

It is very easy to install the package and configure firewall in kali linux

Just follow these simple steps to configure firewall in kali linux and the then configure by yourself

Step-1 In kali linux there are 2 methods to configure firewall
1 ufw {it is configured through command line}

2 gufu {it is configured through graphical user interface}

Step-2 Before configuring the firewall in kali linux we need to install the package of ufw firewall
Here is the command to install the package of ufw firewall

root@kali:~# apt-get install ufw
After installing the package of firewall now we have to check the statusby using this command here you can see the commands

root@kali:~# ufw status
root@kali:~# ufw status verbose

Screenshot (100)

Step-3 Now we have to allow the service by the name or port number
#root@kali:~# ufw allow 80/tcp
#root@kali:~# ufw allow samba
Screenshot (101)

After this now check the rules by number

root@kali:~# ufw status numbered
Step-4 Now we have to secure the web server by blocking the http{40} service and the we have to allow the https{443} service

Here is the command you can see

root@kali:~# ufw deny 80
root@kali:~# ufw allow 443

Screenshot (103)

Step-5 Now Check the firewall rule by name
Here is the command to check the rule by name
root@kali:~# ufw status numbered
Step-6 After this now we have to allow or deny the certain ports so how can we do that
Here is the command to can see how to allow or deny the certain ports

root@kali:~# ufw allow 21:80/tcp
root@kali:~# ufw deny 100:1000/tcp
Screenshot (104)
Step-7 After this now again check the rule
root@kali:~# ufw status numbered
Step-8 Now we have to allow or deny the certain ip addresses by using this ufw firewall
Here is the command you cann see how we allow or deny the ip by using ufw firewall

root@kali:~# ufw allow from 192.168.0.100
root@kali:~# ufw deny from 172.24.0.100

root@kali:~# ufw status numbered {To check the rule again}
Screenshot (105)
Step-9 Now I will tell you what is the configuration file of ufw firewall
root@kali:~# cat /etc/ufw/before.rules

root@kali:~# cat /etc/ufw/after6.rules

This is all how to install the package of firewall and how to configure firewall in kali linux

If you learn something from this tutorial so make sure you please like this post and make sure follow my this beautiful website to learn about more intresting topics of kali linux and windows,Ethical Hacking and much more topics

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: