{"id":520,"date":"2026-09-24T14:08:35","date_gmt":"2026-09-24T14:08:35","guid":{"rendered":"https:\/\/sites.wp.odu.edu\/matthewburd\/?page_id=520"},"modified":"2026-09-24T15:01:34","modified_gmt":"2026-09-24T15:01:34","slug":"ufw-firewall-kali-linux","status":"publish","type":"page","link":"https:\/\/sites.wp.odu.edu\/matthewburd\/ufw-firewall-kali-linux\/","title":{"rendered":"UFW Firewall Kali Linux (Artifact #10)"},"content":{"rendered":"\n<p>This is a step by step of how I set up my Kali Linux UFW Firewall<\/p>\n\n\n\n<p>1. Install UFW <br>Install <strong>UFW (Uncomplicated Firewall)<\/strong>, which provides an easier way to manage Linux firewall rules.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"882\" height=\"520\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-16.png\" alt=\"This image has an empty alt attribute; its file name is image-3.png\" class=\"wp-image-541\" style=\"width:607px;height:auto\" \/><\/figure>\n\n\n\n<p>2. Install UFW <br>Install <strong>UFW (Uncomplicated Firewall)<\/strong>, which provides an easier way to manage Linux firewall rules.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"882\" height=\"520\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-3.png\" alt=\"\" class=\"wp-image-528\" \/><\/figure>\n\n\n\n<p><br>3. Set UFW to deny Incoming traffic <br>Configure the firewall to deny incoming connections by default.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"375\" height=\"70\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-4.png\" alt=\"\" class=\"wp-image-529\" \/><\/figure>\n\n\n\n<p>4. Set UFW to allow outgoing traffic<br>Allow Kali to initiate outgoing network connections.<br><\/p>\n\n\n\n<p>This allows normal activities such as:<\/p>\n\n\n\n<ul>\n<li>Browsing the Internet<\/li>\n\n\n\n<li>Downloading updates<\/li>\n\n\n\n<li>Installing packages<\/li>\n\n\n\n<li>Connecting to external services<\/li>\n<\/ul>\n\n\n\n<p>The combination of denying incoming traffic while allowing outgoing traffic is common for a workstation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"384\" height=\"78\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-5.png\" alt=\"\" class=\"wp-image-530\" \/><\/figure>\n\n\n\n<p>5. View Firewall Status (inactive)<br>Check the current status of UFW.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"241\" height=\"60\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-6.png\" alt=\"\" class=\"wp-image-531\" \/><\/figure>\n\n\n\n<p>6. Enable UFW logging<br>Enable firewall logging so that relevant firewall activity can be recorded.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"267\" height=\"60\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-7.png\" alt=\"\" class=\"wp-image-532\" \/><\/figure>\n\n\n\n<p>7. View Open Ports (I currently have none, so I don&#8217;t need any allow rules. <br>Check which network ports are currently being used by services on Kali.<\/p>\n\n\n\n<p>My system did not show any listening network ports. Because I currently had <strong>no services listening for incoming connections<\/strong>, I did not need to create any inbound allow rules<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"925\" height=\"65\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-8.png\" alt=\"\" class=\"wp-image-533\" \/><\/figure>\n\n\n\n<p> 8. Enable the firewall (Mine is enabled on system startup)<br>Enable UFW after configuring the basic policies.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"412\" height=\"65\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-10.png\" alt=\"\" class=\"wp-image-535\" style=\"width:425px;height:auto\" \/><\/figure>\n\n\n\n<p>9. Verify the Configuration<br>Check the firewall&#8217;s detailed configuration.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"504\" height=\"255\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-11.png\" alt=\"\" class=\"wp-image-536\" \/><\/figure>\n\n\n\n<p>10. Delete the allow list for any unneeded ports. <br>These correspond to commonly used services such as SSH, HTTP, and HTTPS.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"314\" height=\"233\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-12.png\" alt=\"\" class=\"wp-image-537\" \/><\/figure>\n\n\n\n<p>11. Verify&#8230;<br>This confirmed that:<\/p>\n\n\n\n<ul>\n<li>UFW was active.<\/li>\n\n\n\n<li>Logging was enabled.<\/li>\n\n\n\n<li>Incoming traffic was denied by default.<\/li>\n\n\n\n<li>Outgoing traffic was allowed by default.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"522\" height=\"108\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-13.png\" alt=\"\" class=\"wp-image-538\" \/><\/figure>\n\n\n\n<p>12. Now, test the firewall. Confirm internet access<br>Test outgoing connectivity to make sure the firewall did not interfere with normal Internet access.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"189\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-14.png\" alt=\"\" class=\"wp-image-539\" \/><\/figure>\n\n\n\n<p>13. Recheck the status of the firewall<br>Finally, verify that UFW remains active:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"270\" height=\"59\" src=\"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-content\/uploads\/sites\/37981\/2026\/09\/image-15.png\" alt=\"\" class=\"wp-image-540\" \/><\/figure>\n\n\n\n<p>The firewall is now set up properly!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a step by step of how I set up my Kali Linux UFW Firewall 1. Install UFW Install UFW (Uncomplicated Firewall), which provides an easier way to manage Linux firewall rules. 2. Install UFW Install UFW (Uncomplicated Firewall), which provides an easier way to manage Linux firewall rules. 3. Set UFW to deny&#8230; <\/p>\n<div class=\"link-more\"><a href=\"https:\/\/sites.wp.odu.edu\/matthewburd\/ufw-firewall-kali-linux\/\">Read More<\/a><\/div>\n","protected":false},"author":30247,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-json\/wp\/v2\/pages\/520"}],"collection":[{"href":"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-json\/wp\/v2\/users\/30247"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-json\/wp\/v2\/comments?post=520"}],"version-history":[{"count":3,"href":"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-json\/wp\/v2\/pages\/520\/revisions"}],"predecessor-version":[{"id":542,"href":"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-json\/wp\/v2\/pages\/520\/revisions\/542"}],"wp:attachment":[{"href":"https:\/\/sites.wp.odu.edu\/matthewburd\/wp-json\/wp\/v2\/media?parent=520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}