UFW Simple to use

Source: Internet
Author: User

Description: UFW is a host-side Iptables class firewall Configuration tool that makes Linux firewalls easier to use and manage.

How to use:

1. Install the firewall

sudo apt-get install UFW (ubuntu kylin 14.04 lts default installation)

2. View firewall status

sudo UFW status

3. Enable the firewall

sudo ufw enable (turn on the firewall and boot from the boot)

sudo ufw default deny (turns off all external access to this machine, native access is normal externally)

4. Turn off the firewall

sudo ufw disable

5. Enable/Disable the appropriate port or service example

sudo UFW allow 80 (allows external access to port 80)

sudo ufw delete Allow 80 (disallow external access to port 80)

sudo ufw allow from 192.168.1.1 (allows this IP to access all native ports)

sudo UFW deny SMTP (prohibit external access to the SMTP service)

sudo UFW allow SMTP (allows external access to the SMTP service)

sudo ufw deny Proto TCP from 10.0.0.0/8 to 192.168.0.1 Port 22 (denies all TCP traffic from 10.0.0.0/8 to 192.168.0.1 address of 22 port)

6. Recommended settings

sudo UFW enable

sudo ufw default deny

UFW Simple to use

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.