Linux/ubuntu Port Open

Source: Internet
Author: User

Under Ubuntu Open port seems to have two main methods, one is Ubuntu comes with the firewall, one is iptables, here we mainly use iptables. The system version for this article is ubuntu14.04 and ubuntu16.04

Installing Iptables

In general, when Ubuntu is installed, Iptables will be installed, there is no installation and nothing, a command can be installed.

Apt-get Install Iptables

Once you've installed it, you're ready to add rules.

Iptables-i input-p TCP--dport 80-j ACCEPT

You can then directly save the

Iptables-save
Persistent iptables

The above does only temporarily save the open port information, if the server restarts, the saved information is dropped, so we need to persist the port information, here we use iptables-persistent

Installing Iptables-persistent
Apt-get Install Iptables-persistent
Persistent information
Service Iptables-persistent Save

  

Linux/ubuntu Port Open

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.