Differences

This shows you the differences between two versions of the page.


ufw [2015/06/01 23:45] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== ufw ======
  
 +  * [[Firewall]]
 +  * [[iptables]]
 +  * [[Security]]
 +  * [[Ubuntu]]
 +
 +ufw, or uncomplicated firewall, is a command-line application that ships with Ubuntu to setup iptables.
 +
 +Once you enable ufw with ''ufw enable'', it will add the firewall to the startup services.
 +
 +
 +==== Examples ====
 +
 +<code>
 +ufw allow proto tcp to any port 22
 +ufw allow proto tcp to any port 80
 +ufw allow proto tcp to any port 222
 +ufw allow proto tcp to any port 443
 +ufw allow proto tcp to any port 10000
 +ufw enable
 +</code>
 +
 +Allow connections from local subnet, and specific outside IP address:
 +
 +<code>
 +ufw allow from 192.168.12.0/24
 +ufw allow from 1.2.3.4
 +</code>
 +
 +Start firewall
 +<code>
 +ufw enable #interactive
 +yes y | ufw enable # batch
 +</code>
 +
 +Show firewall status
 +<code>
 +ufw status
 +</code>
 +
 +Stop firewall
 +<code>
 +ufw disable
 +</code>
 +
 +Display existing rules:
 +
 +<code>
 +ufw status numbered
 +</code>
 +
 +Delete existing rule:
 +
 +<code>
 +ufw delete <rule number>
 +</code>
 +
 +Save iptables rules
 +<code>
 +iptables-save > foo
 +</code>

Navigation
QR Code
QR Code ufw (generated for current page)