Ubuntu firewall -- theUncomplicatedFirewall (ufw)

Source: Internet
Author: User
Ubuntu comes with a firewall, Which is disabled by default. The explanation is that there is no open network service installed by default and there is no need to block incoming malicious connections. 1. Use terminal to manage. Start/Close the firewall (SEE): sudoufwenable/disablelinuxidc @ www-linuxidc-com :~ $ Sudoufwenable [sudo] passwordforlinuxidc

Ubuntu comes with a firewall, Which is disabled by default. The explanation is that there is no open network service installed by default and there is no need to block incoming malicious connections.

1. Use terminal for management

A. Start/Close the firewall (SEE): sudo ufw enable/disable

Linuxidc @ www-linuxidc-com :~ $ Sudo ufw enable
[Sudo] password for linuxidc:
Enable and activate the firewall when the system starts

B. Allow/Block network activities:

Allow/block ssh service (SEE): sudo ufw allow/block ssh

Linuxidc @ www-linuxidc-com :~ $ Sudo ufw allow ssh
[Sudo] password for linuxidc:
Rule added
Rule added (v6)
Linuxidc @ www-linuxidc-com :~ $

Sudo ufw block


C. Allowed/Blocked ports:

Sudo ufw allow/block 8888

D. View the Firewall Status (SEE)

Sudo ufw status

Linuxidc @ www-linuxidc-com :~ $ Sudo ufw status
[Sudo] password for linuxidc:
Status: Activated

To action from
-----
22 ALLOW Anywhere
22 ALLOW Anywhere (v6)

Related 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.