How to allow remote access to open ports in Linux

How to allow remote access to open ports in Linux

1. Modify the firewall configuration file

# vi /etc/sysconfig/iptables 

wqSave and exit, restart the firewall

service iptables restart

This way port 6379 can be accessed remotely

2. Linux command to open port

Add an open port such as port 80

 # sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT

Save settings

/etc/rc.d/init.d/iptables save

Restart the service to take effect

/etc/init.d/iptables restart

Check whether the open port is effective

/sbin/iptables -L -n

Output the following: Port 80 is open

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80

The above article on how to allow remote access to open ports in Linux is all I have to share with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • Three ways to check whether a port is open in a remote Linux system
  • Summary of methods to check whether the port is open in Linux
  • Summary of Linux methods for detecting whether a remote port is open
  • Detailed explanation of Linux to view the open port number of the server

<<:  MySQL 8.0.2 offline installation and configuration method graphic tutorial

>>:  Detailed explanation of Vue component reuse and expansion

Recommend

Specific use of node.js global variables

Global Object All modules can be called global: r...

10 Tips to Improve Website Usability

Whether it is a corporate website, a personal blo...

Detailed explanation of JavaScript BOM composition and common events

Table of contents 1. BOM 2. Composition of BOM 2....

About Vue's 4 auxiliary functions of Vuex

Table of contents 1. Auxiliary functions 2. Examp...

Vue implements simple data two-way binding

This article example shares the specific code of ...

Solution to find all child rows for a given parent row in MySQL

Preface Note: The test database version is MySQL ...

How does MySQL achieve master-slave synchronization?

Master-slave synchronization, also called master-...

Implementation of importing and exporting docker images

Docker usage of gitlab gitlab docker Startup Comm...

Detailed tutorial on installing Hbase 2.3.5 on Vmware + Ubuntu18.04

Preface The previous article installed Hadoop, an...

Solution to secure-file-priv problem when exporting MySQL data

ERROR 1290 (HY000) : The MySQL server is running ...

A link refresh page and js refresh page usage examples

1. How to use the link: Copy code The code is as f...

Detailed explanation of MySQL user rights verification and management methods

This article uses examples to illustrate how to v...

JavaScript Basics: Error Capture Mechanism

Table of contents Preface Error Object throw try…...

Use js to call js functions in iframe pages

Recently, I have been working on thesis proposals ...