Ubuntu Firewall UFW

Source: Internet
Author: User

sudo apt-get install UFW

sudo UFW enable

sudo ufw default deny

Booted the firewall, boot up and shut down all external access to the native, but the local access is normal outside.

3. Turn ON/off

sudo ufw allow|deny

sudo UFW allow SMTP allows all external IPs to access native 25/TCP (SMTP) ports

sudo ufw allow 22/tcp allows all external IP access to the native 22/tcp (SSH) port

sudo UFW allow 53 allows external access to 53 ports (TCP/UDP)

sudo ufw allow from 192.168.1.7 allows this IP access to all native ports

sudo UFW deny SMTP prevents external access to the SMTP service

sudo ufw delete allow SMTP to delete a rule established above

4. View firewall status

sudo UFW status

Turn firewall on/off (default setting is disable)

sudo ufw enable|disable

Ubuntu Firewall UFW

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.