When using some software on the server, you need to turn on the corresponding firewall port number , Let's have a brief understanding Linux Firewall port

Firewall policy

Firewall policies can be based on the source and destination addresses of traffic , Port number , agreement , Application and other information to customize , Then the firewall monitors the incoming and outgoing traffic using pre customized policy rules , If the traffic matches a policy rule , Then perform the corresponding processing , Otherwise, discard . Play a filtering role , Ensure the safety of the host .

<> see firewall Service status
systemctl status firewalld

<> open , restart , close ,firewalld.service service

1. open
service firewalld start
2. restart
service firewalld restart
3. close
service firewalld stop
4. View firewall rules
firewall-cmd --list-all # View all information firewall-cmd --list-ports # Port information only

5. Open port
Open port command :firewall-cmd --zone=public --add-port=8080/tcp --permanent
Restart firewall service :systemctl restart firewalld.service
Command meaning :
--zone # Scope --add-port=80/tcp # Add port , Format is : port / Communication protocol --permanent # Permanent effect , Without this parameter, it will be invalid after restart
for example : Open port 6380 Protocol bit tcp Permanent effect Scope is all
firewall-cmd --zone=public --add-port=6380/tcp --permanent

Open successfully !

be careful : If used Xshell After opening the firewall port for remote connection , You also need to add corresponding port rules to the firewall in Alibaba cloud server security

©2019-2020 Toolsou All rights reserved,
【C++ Must see for entry 】C++ from 0 reach 1 Introductory programming axios Interceptor packaging and use Spring Boot Interview must ask : Automatic configuration principle VMware 16 install centos 7 Detailed tutorial C Language data structure - Sequence table delete duplicates V2.0.0 The 12th Blue Bridge Cup c++b Group personal problem solving On sending data from serial port single chip microcomputer to upper computer centos7 install RabbitMqjava Polymorphic array of opencv-python Fourier transform and inverse transform