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
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
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
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
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
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
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 open the ne
=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
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
Original address: http://www.veryhuo.com/a/view/48280.htmlWhat are the inbound rules and outbound rules for firewallsTo put it simplyOutbound is where you visit the extranetInbound is the extranet to access youRemember writing a tutorial two years ago about how to add a port to a system firewall under Windows Server 2008 , and now add it. Because today has friends to consult the fire network small, his windows2008 is 64 Enterprise Edition, looked for
spt:22Now the Linux server only opened 22 ports, with Putty.exe test whether you can link up.Can be linked up, stating that there is no problem.Finally, don't forget to save your firewall settingsSave by Command: Service iptables saveRestart IptablesService iptables Save service iptables restartShutting down the firewallChkconfig iptables off service iptables stopIptables-a input-p TCP--dport 22-j ACCEPT
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.