Linux --- Ubuntu14.04 firewall configuration, ubuntu14 disable Firewall

Source: Internet
Author: User

Linux --- Ubuntu14.04 firewall configuration, ubuntu14 disable Firewall

Ubuntu14.04 Firewall Configuration

1. installation:

Apt-get install ufw

2. enable:

Ufw enable

Ufw default deny

3. enable/disable:

Ufw allow 22/tcp allows all external IP addresses to access the local port 22/tcp (ssh)

Ufw deny 22/tcp prohibit all external IP addresses from accessing the local port 22/tcp (ssh)

Ufw delete deny 22/tcp delete firewall rules

4. instance:

1) view the Local Firewall Status:

2) Enable Firewall:

Because I use ssh to connect to the server, When I enable the firewall, the system will ask if I want to confirm the operation. This command may disconnect the ssh connection.

3) add rules:

Add all external IP addresses to access port 22 rules based on TCP protocol:

Check the system firewall status and you will find that the rules have been added:

To add all external IP addresses, you can access port 123 over TCP:

Disable port 123:

Delete the rule for port 123:

Allow this IP address to access all local ports:

Delete the previous rule:

Disable Firewall:


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.