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
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-cmd--permanent--zone=public --remove-port= TCP--zone #作用域 --add-port=80/tcp #添加端口 in the format: port/Communication p
Tags: Linux nmap port scan network segmentLinux generally does not automatically install NMAP commands using the Yum-y install nmap installation nmap command, provided that you have configured the Yum source.Nmap Features:Host detectionPort scanVersion detectionSystem detectionSupports the authoring of probe scripts
Nmap Command Detailed
nmapip_address #nmap默认发送一个arp的ping数据包 to detect all open
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
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 --reloadView
firewall-cmd --zone= public --query-por
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
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-
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
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
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
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
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
View Status:Iptables-l-NAdd the following methods for opening a specific port:Use Iptables to open the following ports/sbin/iptables-i input-p TCP--dport 8000-j ACCEPTSave/etc/rc.d/init.d/iptables SaveRestart ServiceService Iptables RestartSee if the port you want to open takes effect?/etc/init.d/iptables statusAct 2:or edit/etc/sysconfig/iptables directly-A inpu
View Status:Iptables-l-NAdd the following methods for opening a specific port:Use Iptables to open the following ports/sbin/iptables-i input-p TCP--dport 8000-j ACCEPTSave/etc/rc.d/init.d/iptables SaveRestart ServiceService Iptables RestartSee if the port you want to open takes effect?/etc/init.d/iptables statusAct 2:or edit/etc/sysconfig/iptables directly-A inpu
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-
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.