How to reserve a tcp local port? Ask Question. Asked 4 years ago. Active 2 years, 1 month ago. Viewed 4k times. In my application, I bind a socket to the port While in test, I find sometime the port is used by another application. So I failed to bind on it and get the error, "Address already in use". So I add a new line "net. Then I reboot the system. But I still find a port out of the range which I set is used by some application. Could anyone give me some advice?
The linux system may assign any port in the port pool to any application when it need a port. Improve this question. Forward Forward 6 6 silver badges 12 12 bronze badges. Why not use a different port? Yes, I can, but the port may be used by another application.
If I want to keep my port is not used by any other application, I have to reserve it from system — Forward. Add a comment. Active Oldest Votes. Improve this answer. You could try with: sysctl -w net. Note that this is untested.
However, this is the accepted answer to the question: Technically, there's no such thing as a "reserved port". For the answers of "how do I reserve ports for my application?
I can't make sure my application run firstly in the system, Actually my application runs secondly and the linux system assign the port to the first application. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Internet Authentication Service IAS performs centralized authentication, authorization, auditing, and accounting of users who are connecting to a network. These users can be on a LAN connection or on a remote connection. This system service provides NAT, addressing, and name resolution services for all computers on your home network or your small-office network.
When the Internet Connection Sharing feature is enabled, your computer becomes an Internet gateway on the network. Other client computers can then share one connection to the Internet, such as a dial-up connection or a broadband connection. They do not provide these services on the external network interface.
When you use the Kerberos Key Distribution Center KDC system service, users can sign in to the network by using the Kerberos version 5 authentication protocol. As in other implementations of the Kerberos protocol, the KDC is a single process that provides two services: the Authentication Service and the Ticket-Granting Service.
The Authentication Service issues ticket granting tickets, and the Ticket-Granting Service issues tickets for connection to computers in its own domain. The License Logging system service is a tool that was originally designed to help customers manage licenses for Microsoft server products that are licensed in the server client access license CAL model.
By default, the License Logging service is disabled in Windows Server Because of legacy design constraints and evolving license terms and conditions, License Logging may not provide an accurate view of the total number of CALs that are purchased compared to the total number of CALs that are used on a particular server or across the enterprise.
License Logging is not included in Windows Server and later operating systems. We recommend that only users of the Microsoft Small Business Server family of operating systems enable this service on their servers. The Message Queuing system service is a messaging infrastructure and development tool for creating distributed messaging programs for Windows.
These programs can communicate across heterogeneous networks and can send messages between computers that may be temporarily unable to connect to one another. Message Queuing helps provide security, efficient routing, support for sending messages within transactions, priority-based messaging, and guaranteed message delivery. The Microsoft POP3 service provides email transfer and retrieval services.
Administrators can use this service to store and manage email accounts on the mail server. When you install POP3 service on the mail server, users can connect to the mail server and can retrieve email messages by using an email client that supports the POP3 protocol, such as Microsoft Outlook. The Net Logon system service maintains a security channel between your computer and the domain controller to authenticate users and services. It passes the user's credentials to a domain controller and returns the domain security identifiers and the user rights for the user.
This is typically known as pass-through authentication. Net Logon is configured to start automatically only when a member computer or domain controller is joined to a domain. The NetMeeting Remote Desktop Sharing system service allows authorized users to use Windows NetMeeting to remotely access your Windows desktop from another personal computer over a corporate intranet.
You must explicitly enable this service in NetMeeting. You can disable or shut down this feature by using an icon that is displayed in the Windows notification area. Clients can use a news client, such as Microsoft Outlook Express, to retrieve newsgroups from the server and to read the headers or the bodies of the articles in each newsgroup.
Offline Files and Roaming User Profiles cache user data to computers for offline use. These capabilities exist in all supported Microsoft operating systems. All of these systems use SMB. Folder Redirection redirects user data from the local computer to a remote file share, using SMB. Primary Computer provides a capability to prevent data caching to computers that are not authorized by administrators for specific users.
This system was added in Windows Server The Performance Logs and Alerts system service collects performance data from local or remote computers based on preconfigured schedule parameters and then writes that data to a log or triggers a message.
Based on the information that is contained in the named log collection setting, the Performance Logs and Alerts service starts and stops each named performance data collection. This service runs only if at least one performance data collection is scheduled. The Print Spooler system service manages all local and network print queues and controls all print jobs. Print Spooler is the center of the Windows printing subsystem.
The Remote Procedure Call RPC system service is an interprocess communication IPC mechanism that enables data exchange and invocation of functionality that is located in a different process. Many services depend on the RPC service to start successfully. By default, this service is turned off. The Remote Storage Notification system service notifies users when they read from or write to files that are available only from a secondary storage media.
Stopping this service prevents this notification. The Remote Storage system service stores infrequently used files on a secondary storage medium. If you stop this service, users cannot move or retrieve files from the secondary storage media.
Although the Routing and Remote Access service can use all the following protocols, the service typically uses only a few of them. For example, if you configure a VPN gateway that is behind a filtering router, you will probably use only one protocol. For more information about this, see the References section. The Server system service provides RPC support and file sharing, print sharing, and named pipe sharing over the network.
The Server service lets users share local resources, such as disks and printers, so that other users on the network can access them. It also enables named pipe communication between programs that are running on the local computer and on other computers. Named pipe communication is memory that is reserved for the output of one process to be used as input for another process. The input-accepting process does not have to be local to the computer. Preloaded Lmhosts entries will bypass the DNS resolver.
Windows and newer clients can work over port The SharePoint Portal Server system service lets you develop an intelligent portal that seamlessly connects users, teams, and knowledge. It helps people take advantage of relevant information across business processes. Microsoft SharePoint Portal Server provides an enterprise business solution that integrates information from various systems into one solution through single sign-on and enterprise application integration capabilities. It accepts and queues email messages for remote destinations, and it retries at set intervals.
Windows domain controllers use the SMTP service for intersite e-mail-based replication. SNMP Service includes agents that monitor activity in network devices and report to the network console workstation. SNMP Service provides a method of managing network hosts such as workstation or server computers, routers, bridges, and hubs from a centrally located computer that is running network management software.
SNMP performs management services by using a distributed architecture of management systems and agents. These messages are sent to a trap destination. For example, an agent can be configured to start an authentication trap if an unrecognized management system sends a request for information. The trap destination must be a network-enabled host that is running SNMP management software.
SSDP Discovery Service manages receipt of device presence announcements, updates its cache, and sends these notifications to clients that have outstanding search requests. The registered event callbacks are then turned into subscription requests. SSDP Discovery Service then monitors for event notifications and sends these requests to the registered callbacks. This system service also provides periodic announcements to hosted devices. A Telnet server supports two kinds of authentication and supports the following kinds of terminals:.
Terminal Services provides a multi-session environment that enables client devices to access a virtual Windows desktop session and Windows-based programs that are running on the server. Terminal Services enables multiple users to be connected interactively to a computer. The Terminal Services Licensing system service installs a license server and provides licenses to registered clients when the clients connect to a terminal server a server that has Terminal Server enabled.
Terminal Services Licensing is a low-impact service that stores the client licenses that are issued for a terminal server and tracks the licenses that are issued to client computers or terminals. The Terminal Services Session Directory system service enables clusters of load-balanced terminal servers to correctly route a user's connection request to the server where the user already has a session running.
Users are routed to the first-available terminal server regardless of whether they are running another session in the server cluster. You can use this service together with a cluster of terminal servers to increase the performance of a single terminal server by distributing sessions across multiple servers. Terminal Services Session Directory keeps track of disconnected sessions on the cluster and makes sure that users are reconnected to those sessions.
Therefore, when you enable this port, the TFTP service receives incoming TFTP requests, but it does not let the selected server respond to those requests. The service is free to respond to any such request from any source port, and the remote client then uses that port during the transfer.
Communication is bidirectional. If you have to enable this protocol through a firewall, you may want to open UDP port 69 incoming. You can then rely on other firewall features that dynamically let the service respond through temporary holes on any other port.
The UPnP Device Host discovery system service implements all the components that are required for device registration, control, and the response to events for hosted devices. The information that is registered that relates to a device, such as the description, the lifetimes, and the containers, are optionally stored to disk and are announced on the network after registration or when the operating system restarts.
The service also includes the web server that serves the device in addition to service descriptions and a presentation page. WINS servers are required unless all domains have been upgraded to the Active Directory directory service and unless all computers on the network are running Windows or later versions.
Windows Media Services in Windows Server and later versions replaces the following services that are included in Windows Media Services versions 4. Windows Media Services is now a single service that runs on Windows Server. Its core components were developed by using COM, and it has a flexible architecture that you can customize for specific programs.
Windows Media Services supports a larger variety of control protocols. The Windows Time system service maintains date and time synchronization on all the computers on a network that are running Windows XP or later versions and Windows Server or later versions. This service uses Network Time Protocol NTP to synchronize computer clocks so that an accurate clock value, or time stamp, is assigned for network validation and for resource access requests.
The implementation of NTP and the integration of time providers help make Windows Time a reliable and scalable time service for your business. For computers that are not joined to a domain, you can configure Windows Time to synchronize time with an external time source.
If this service is turned off, the time setting for local computers is not synchronized with a time service in the Windows domain or with an externally configured time service.
Windows Server uses NTP. When the Windows Time service uses a Windows domain configuration, the service requires domain controller location and authentication services. Therefore, the ports for Kerberos and DNS are required. World Wide Web Publishing Service provides the infrastructure that you must have to register, manage, monitor, and serve websites and programs that are registered with IIS.
This system service contains a process manager and a configuration manager. The process manager controls the processes where custom applications and websites reside. The configuration manager reads the stored system configuration for World Wide Web Publishing Service and makes sure that Http.
The following table summarizes the information from the System services ports section. This table is sorted by port number instead of by service name. Port is only used on a Windows Server domain controller or a Windows Server R2 domain controller; it is not used on a Windows Server domain controller.
Port is used by DFSR only when creating a new empty replicated folder. Microsoft provides part of the information that is in this table in a Microsoft Excel worksheet. This worksheet is available for download from the Microsoft Download Center. Application servers, client computers, and domain controllers that are located in common or external forests have service dependencies so that user-initiated and computer-initiated operations such as domain join, logon authentication, remote administration, and Active Directory replication work correctly.
Such services and operations require network connectivity over specific port and networking protocols. A summarized list of services, ports, and protocols required for member computers and domain controllers to inter-operate with one another or for application servers to access Active Directory include but are not limited to the following. The Help files for each Microsoft product that is described in this article contain more information that you may find useful to help configure your programs.
For information about Active Directory Domain Services firewalls and ports, see How to configure a firewall for Active Directory domains and trusts. For more information about how to help secure Windows Server and for sample IPsec filters for specific server roles, see Microsoft Security Compliance Manager. This tool aggregates all previous security recommendations and security documentation into a single utility for all support Microsoft operating systems:.
For more information about operating system services, security settings, and IPsec filtering, see one of the following Threats and Countermeasures Guides:. The Internet Assigned Numbers Authority coordinates the use of well-known ports. For more information about how to configure RPC to work with a firewall, see How to configure RPC dynamic port allocation to work with firewalls. For more information about how to restrict Active Directory replication and client logon traffic, see Restricting Active Directory replication traffic and client RPC traffic to a specific port.
0コメント