Ubuntu default firewall install, enable, configure, port, view status related information

Source: Internet
Author: User

Ubuntu comes with a relatively iptables, much simpler firewall configuration tool: UFW

UFW Firewall is uncomplicated firewall, not complex firewall, the cumbersome part of the setup still need to go to iptables

View firewall status

sudo UFW status

Firewall version

sudo UFW version

1. Installation

sudo apt-get install UFW

2. Enable  

sudo ufw enablesudo UFW default Deny

After running the above two commands, the firewall is turned on and turned on automatically when the system starts.

All external access to the native is turned off, but the native access is normal externally.

3. Turn ON/off

sudo ufw allow|deny [service]

To turn a port on or off

4. Turn firewall on/off (The default setting is ' Disable ')

sudo ufw enable|disable

  

eg

sudo ufw allow 3306

To enable MySQL to be accessed remotely, turn on MySQL Port 3306

  

Ubuntu default firewall install, enable, configure, port, view status related information

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.