---Ubuntu14.04 firewall configuration of Linux learning article

Source: Internet
Author: User

Ubuntu14.04 firewall configuration

1. Installation:

Apt-get Install UFW

2. Enable:

UFW Enable

UFW default Deny

3. Turn ON/OFF:

UFW Allow 22/TCP allows all external IP access to the native 22/tcp (SSH) port

UFW deny 22/tcp Disable all external IP access to native 22/tcp (SSH) ports

UFW Delete Deny 22/tcp remove a rule from the firewall

4. Example:

1) View native firewall status:

2) Enable the firewall:

Because I am using the SSH connected server, so when I enable the firewall, the system asks whether to confirm this command operation, this command may disconnect the SSH connection.

3) Add rule:

Adding all external IPs can access 22 port rules per TCP protocol:

Then look at the system firewall state and you will find that the rule has been added:

Adding all external IPs can access 123 ports by TCP protocol:

Disable Port 123:

To remove the 123 port rule:

Allow this IP to access all of the native ports:

Delete the previous rule that you just added:

To disable the firewall:


---Ubuntu14.04 firewall configuration of Linux learning 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.