Summary of Ubunt's default firewall tool UFW

Source: Internet
Author: User

I. Introduction

UFW is the default firewall management tool for ubuntu, which has been available since 8.04LTS.

It also appears to simplify the IPTABLES configuration. However, iptables is not powerful.

Ii. Default Configuration

Disabled by default, such:

 

As shown in figure, enable ufw, disable ufw, and view ufw status ):

All communications are allowed by default, that is, all communications are allowed by default, that is, ufw defautl allow. The method changed to ufw default disable.

Iii. Configuration

Ufw can be configured based on the port and ip address, or based on the service configuration (this is good :)).
For example, reject port 80: ufw deny 80

To delete the configuration, run ufw delete ufw deny 80.

Ip-based configuration, such:

Ufw deny from 192.168.1.0/24

Reject all communications from 192.168.1.0/24 network segments

It can also be based on ports, such:

Ufw deny proto tcp from any to 192.168.222.132 port 22

The host is denied from connecting to port 22 of SSH. For example:

Service-based configuration, such as ufw deny ssh. The effect is as follows:




Ufw logging on is enabled.

 

Log directory in/var/log/ufw. log

For more information, see man ufw.

If you are not used to password-line configuration, you can try Gufw, a graphical interface. It is the product of the shield icon. For example:

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.