Install and use UFW firewall in Ubuntu

Source: Internet
Author: User
UFW Firewall is a host-side iptables Firewall Configuration tool. The purpose of this tool is to provide users with an interface that can be easily controlled, just like package integration and dynamic detection of open ports. Install UFW in Ubuntu: this package exists in Ubuntu 8.04. Sudoapt-getinstallufw the above command will install the software in your system. Enable/disable firewall ('disable' by default) # ufwenab

UFW Firewall is a host-side iptables Firewall Configuration tool. The purpose of this tool is to provide users with an interface that can be easily controlled, just like package integration and dynamic detection of open ports.

Install UFW in Ubuntu:

Currently, this package exists in the Ubuntu 8.04 library.

Sudo apt-get install ufw

The above command will install the software in your system.

Enable/disable firewall ('disable' is set by default ')

# Ufw enable | disable

Change log status

# Ufw logging on | off

Set the Default policy (for example, "mostly open" vs "mostly closed ")

# Ufw default allow | deny

You can block some inbound packages (you can view the service list in "status" [see the following article]). You can use "Protocol: Port" to specify a service name that exists in/etc/services, or use the meta-data package. The 'allow' parameter adds the entries to/etc/ufw/maps, while the 'deny' parameter is the opposite. The basic syntax is as follows:

# Ufw allow | deny [service]

Display the listening status of the firewall and port. For more information, see/var/lib/ufw/maps. The numbers in the brackets are not displayed.

# Ufw status

[Note: Although sudo is not used in the above text, the command prompt symbols are "#". So ...... You know what it means. This is the case in the original article. -- Translator's note]

UFW usage example:

Allow port 53

$ Sudo ufw allow 53

Disable port 53

$ Sudo ufw delete allow 53

Allow port 80

$ Sudo ufw allow 80/tcp

Disable port 80

$ Sudo ufw delete allow 80/tcp

Allow smtp Port

$ Sudo ufw allow smtp

Delete the smtp port license

$ Sudo ufw delete allow smtp

Allow a specific IP Address

$ Sudo ufw allow from 192.168.254.254

Delete the preceding rule

$ Sudo ufw delete allow from 192.168.254.254

------------------------------------------

I still use 7.10, so the above steps have not been tested during the translation process.

Ubuntu names are not easy to remember:

* Ubuntu 6.06 LTS (Dapper Drake)

* Ubuntu 6.10 (Edgy Eft)

* Ubuntu 7.04 (Feisty Fawn)

* Ubuntu 7.10 (Gutsy Gibbon)

* Ubuntu 8.04 (hard Heron)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.