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 found the setting method through some channel
containingCreates a component that connects or listens on ports for all executable components. Interval Displays the selected statistics, between each displayPause interval (in seconds). Press CTRL + C to stop re-Displays statistics. If omitted, Netstat displays the currentConfiguration information (show only once)NETSTAT-NL | grep 110You can use it if you see the result (the port number is turned on)First, you can look at the/etc/services file, cha
execute the mount, as follows:
Mount:mount to NFS server ' 192.168.0.10 ' Failed:system error:no route to host.
This is mainly due to firewall problems caused by the opening of the firewall on the corresponding port canSince NFS services require the opening of the Mountd,nfs
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-prohibited-A forward-j REJECT --reject-with icmp-ho
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 protocol --permanent #永久生效, no failure after this parameter is restarted View
When mounting NFS, You need to activate the access permissions for those ports.Mount 10.12.13.11:/vol/lft_jjmk/mntUnable to mount, because the network has a limited permission configuration, in order to find out which ports need to be activated to mount nfs, the following attempt is made here.After you have knocked on the command, you are in the waiting status.Mo
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 fire
Batch add firewall exception ports in Windows
Copy codeThe Code is as follows: echo off
Cls
Set var = 30000
Set end = 30010
: Continue
Set/a var + = 1
Echo add port % var %
Netsh firewall add portopening TCP % var % ftp_data _ % var %
If % var % lss % end % goto continue
Echo complete
Pause
The following article highlights that you can manually add them in order
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-port=80/tcpDelete
Performance test of LAN switch interface in Flight Tower firewallUnited States flight Tower Fortinet Firewall, the default intranet interface type is hardware exchange, all intranet interfaces share a gateway, the intranet interface allows mutual access, here will be two notes A, B access to the 13, 14 ports to be tested. Notebook A's intranet IP address is set to 10.0.1.28, and the intranet IP address of
Test Environment redhat 5.4, enabling ports 3306 and 8080Modify the iptables file in/etc/sysconfig:
# Firewall configuration written by system-config-securitylevel# Manual customization of this file is not recommended.* Filter: Input accept [0: 0]: Forward accept [0: 0]: Output accept [0: 0]: RH-Firewall-1-INPUT-[0: 0]-A input-j RH-
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-firewall
=ftp--permanent # #永久开放ftp服务Firewall-cmd--remove-service=ftp--permanent # #永久移除ftp服务Firewall-cmd--add-port=80/tcp--permanent # #永久添加80端口Iptables-l-N # #查看规则, this command is the same as IptablesMan Firewall-cmd # #查看帮助
more commands, using firewall-cmd--help to view Help files
>>> CentOS 7.0 uses
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.