Query port number 80 to open: Firewall-cmd --query-port = the / TCPpermanently open 80 Port number: firewall-cmd--permanent--zone=public --add-port = the / TCPRemoving the 80 port number:firewall-
Query port number 80 is open: Firewall-cmd--query-port=80/tcp
Permanent Open 80 port number: Firewall-cmd--permanent--zone=public--add-port=80/tcp
Remove 80 port number: Firewall
The firewall sets open ports for external use, and the Firewall opens ports for external use.
When deploying the project today, I met another person in the project team who reorganized iis on the server. As a result, I couldn't access the subordinate project externally and
Edit/etc/sysconfig/iptables, add- s 127.0.0.1 --dport 6379-J Accept-s 126.212.173.185 --dport 6379-j ACCEPTThe above add red place is only to the local and 126.212.173.185 open 6379 port, other IP with Telnet is not connected,If there is no limit to access IP, you do not need to add the- s IP address , for example-A input-m state--state new-m tcp-p TCP--dport 6379-j ACCEPTYes, be sure to add it at the end-A input-j REJECT--reject-with icmp-host-prohib
Add open ports to CentOS firewallAdd
firewall-cmd --zone=public --add-port=80/tcp --permanent
(-Permanent takes effect permanently. If this parameter is not set, it will become invalid after restart)Reload
firewall-cmd --reloa
CentOS 7 Open firewall Port command
Recently, the company's new server requirements with CentOS7, found that the previous CentOS 6 series of iptables related commands can not be used, check the next, found that CentOS 7 use FIREWALLD instead of the original iptables.
use the following methods:
>>> Shutdown Firewall
Systemctl Stop Firewalld.service #停止firewallSyst
Reprinted from: https://linux.cn/article-4243-1.htmlIf you want to provide services on the server, Enterprise Linux distributions such as CentOS or Rhel contain built-in powerful firewalls, which are strictly the default firewall rules. Therefore, if you install any custom services (such as Web servers, NFS, and Samba), then their traffic is likely to be blocked by firewall rules. So you need to
just see the numbers.Delete the corresponding rule.iptables-d OUTPUT 1 Here 1 represents the first rule.When you delete the previous rule, the number will change as well. See it.OK, we have removed the previous 2 rules, 22 port can also be used normally, it means that no problem.Save it below, and don't forget, otherwise the reboot will revert back to the original look.The service iptables save.Saving firewall rules to/etc/sysconfig/iptables: [OK]In
Note: The basic operation of the firewall command:Querying firewall Status:[[Email protected] ~]# service iptables statusTo stop the firewall:[[Email protected] ~]# service iptables Stop To start the firewall:[[Email protected] ~]# service iptables start To restart the firewall
A firewall (iptables) is a system service located at:/etc/init.d/iptablesFirewall configuration information, saved in this file:/etc/sysconfig/iptablesThe Firewall service start, stop, restart, query status, save configuration and other commands as follows:# Service iptables start/stop/restart/status/saveLinux Firewall Open
Iptables is a firewall under Linux and is also the service name.Service iptables Status View firewall stateService iptables start to turn on the firewallservice iptables Stop shutting down the firewallService iptables Restart Restart firewallfirewalls Open specific ports:① file/etc/sysconfig/iptables② Add:-A rh-
Enable, disable, and open the specified port of the CentOS 6.2 firewall. d/iptables stop: View 114 again at www.2cto.com. 80. *. *: 8080 (ip: 8080) was successful. However, it seems that security risks are greatly increased ...... Use/etc/init. d/iptables status to view the firewall information. The opened port is displayed. It is feasible to
Open ports of Linux Firewall
I. Linux firewall configuration files and commands
1. RedHat Linux System
This type of system contains various derivatives and related versions of red hat, including RHEL, CentOS, and Fedrora.
Firewall Configuration File:/etc/sysconfig/iptabl
Before I was busy setting up the environment, I didn't have time to write it, now fill it up.On Linux, when we use the one-click installation package to build the environment, the firewall automatically releases. For example, sometimes it is convenient to use tools to remotely connect to Redis for the time being.Obviously the environment has been set up, the corresponding changes in the configuration is not even, at this time, we should see if our
In many projects, NetScaler is generally placed in the DMZ, and NS is isolated from the backend infrastructure network, and the general bank and securities customers only open ports for VDI access, and here's the Citrix NetScaler ports that I previously organized in a project ...Firewall
. You can use Netstat-ano to view the port opening in CMD.
But through the extranet to access the server ip:8080 to find that cannot connect. This is because the default 8080 port is not open. The steps are as follows:
Aliyun WindowsServer2012 Open the 8080 port method:
1. Go to Control Panel Select Firewall, select A
SuSE firewall commandLinux :~ # Chkconfig-list | grep-I fire
Susefirewall2_init 0: off 1: off 2: off 3: off 4: off 5: off 6: Off
Susefirewall2_setup 0: off 1: off 2: off 3: off 4: off 5: off 6: Off
SuSE firewall Stop command nowLinux :~ # Susefirewall2 stop
Susefirewall2: Warning: ip6tables does not support State matching. Extended IPv6 support disabled.
Sus
When we use the new server to set up a new host, often encounter the site can not access the situation, when asked about customer service, often told that the operating system does not open the default 80 port, please first determine whether 80 is open and determined not to be occupied. So, how do we open port 80?Method/Step
1Click: Start-Control Panel
2S
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.