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 '' | ||
+ | |||
+ | |||
+ | ==== Examples ==== | ||
+ | |||
+ | < | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | Allow connections from local subnet, and specific outside IP address: | ||
+ | |||
+ | < | ||
+ | ufw allow from 192.168.12.0/ | ||
+ | ufw allow from 1.2.3.4 | ||
+ | </ | ||
+ | |||
+ | Start firewall | ||
+ | < | ||
+ | ufw enable # | ||
+ | yes y | ufw enable # batch | ||
+ | </ | ||
+ | |||
+ | Show firewall status | ||
+ | < | ||
+ | ufw status | ||
+ | </ | ||
+ | |||
+ | Stop firewall | ||
+ | < | ||
+ | ufw disable | ||
+ | </ | ||
+ | |||
+ | Display existing rules: | ||
+ | |||
+ | < | ||
+ | ufw status numbered | ||
+ | </ | ||
+ | |||
+ | Delete existing rule: | ||
+ | |||
+ | < | ||
+ | ufw delete <rule number> | ||
+ | </ | ||
+ | |||
+ | Save iptables rules | ||
+ | < | ||
+ | iptables-save > foo | ||
+ | </ |