Categories
Interior

How to see active network connections (windows)

How to See Active Network Connections (Windows)

If you want to see the active network connections in your Windows computer, then you can check it in Network and Sharing Menu, Network connections folder, and by using ‘netstat’ command. In all the versions of Microsoft Windows, you check active network connections with these methods. Windows 10 users can open the Network and Sharing Center. And the ‘netstat’ command can be used in all other versions of Windows. With this command tool, you can check the problems and the network traffic.

How to access Network and Sharing Menu in Windows (Windows 7 & 10)

Network and Sharing Center is where you can check the type of connection you’re connected to and the status of the network.

2. Click ‘Settings’.

3. Under Network & Internet, click ‘Ethernet.’

4. On the right side, click ‘Network & Sharing Center.’

5. Click the ‘icon’ next to “Connections:” It should correspond to the type of connection your device is connected with like Ethernet or Wireless.

6. On the connection status windows, click the ‘Details…’ button.

Here you can check the details of the network connection you’ve.

How to access the network connections folder in Windows (Windows 7)

1. Click the ‘Start’ button.

2. Enter ‘ncpa.cpl’ in the search bar.

4. Open ‘ncpa.cpl’ from the result.

5. Network connections folder will open. Here you can see all the connections available on your network.

6. Select the connection you want to enable or disable and check its status.

7. Right click on the connection and select ‘Status’ from the options.

8. On the connection status windows, here you can see the details of the network connection.

9. Click the ‘Details…’ button for more information.

How to use the netstat command to view network connections

1. Click the ‘Start’ button.

2. Enter ‘cmd’ into the search bar to open the command prompt.

3. Wait for command prompt (black window) to appear. This is the window where you’ll enter the ‘netstat’ command.

4. Enter ‘netstat -a’ to view current connections.

When you run netstat command, a list of current TCP (Transmission Control Protocol connections and ports) with the details like computer name, local address, remote address, state, etc. will display.

5. Enter ‘netstat -b’ to see the programs using connections.

6. Enter ‘netstat -n’ to see the IP addresses.

When you run this command, it will also show the TCP list but with the IP address of the computers or services instead of their name.

7. Enter ‘netstat /?’ to view the more commands available for you.

That’s it! Check the active network connections in any version of Windows computer with this command.

Howdy, I’m Ela Thomas. I’m a software engineer living in Ohio. I am a fan of technology, photography, and design. I’m also interested in music and blogging.

My Internet connection has been slow lately, and I think it might be a possible attack. A friend has told me to use Wireshark, but it is a big install, and I do not have the time to learn how to use it. Is there an easier way to see all the connections on my PC so I can take further action?

How to See Active Network Connections (Windows)

6 Answers 6

You are looking for the netstat command. This command should provide what you’re looking for:

if you would also like to see what programs are using the specified ports you can use:

to use the netstat program:

  • Go to the start menu (or press Win + r and skip to step 3)
  • If on XP, click “Run”, If on vista or later, search for cmd in the search box and skip to step 4.
  • type cmd
  • after cmd opens, type netstat -a
  • a list of all open connections with their ports will be displayed

more info about netstat:

I would also recommend running Autoruns and Process Explorer, also in the Sysinternals Suite to help diagnose your problem.

If you’re looking for a simple look at which connections are hungry on Windows 7 onwards, then bring up Task Manager, Performance tab, Resource Monitor, Network tab.

Prio (http://www.prnwatch.com/prio.html) can provide, as part of the Windows Task Manager, an updating list connections with some additional context that may help you make sense of what is going on.

You can see the active ports aligned with the processes in use.

It adds a lot of functionality to the task manager and it is all contained in one area.

I am not a computer scientist but I find that netstat is a bit slow and many connections pass through unrecorded, wireshark is fast but has too many packets to filter through and windows resource monitor is too hard to look through the list to see who is making connections.

The easiest way I could come up with is going into your antivirus software and in the firewall section add the program to the list of blocked programs (or add it to the list of allowed programs and edit it to blocked). You should get a warning if you open a file of that program and it tries to connect or the program just tries to connect.See the security history of your antivirus to get a list of suspicious connections.

P.S. If you want to see all connections your computer is making I think wireshark is the best. Filter with your mac address: eth.addr==xyz

How to See Active Network Connections (Windows)

Linked

Related

Hot Network Questions

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

  • Blog
  • Facebook
  • Twitter
  • LinkedIn
  • Instagram

site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2020.9.25.37676

Troubleshoot a non-working network without rebooting

How to See Active Network Connections (Windows)

  • Tweet
  • Share
  • Email

By default, Windows automatically enables and uses plugged in network interfaces, including Wi-Fi and wired adapters. When a Wi-Fi connection or Ethernet stops functioning, the operating system disables the connection automatically. The connection can also be disabled manually to troubleshoot and fix network problems.

If your internet isn’t working, disable and re-enable the connection to reset the network-specific functionality without rebooting the computer. This process sometimes clears certain kinds of network problems just like a full reboot would.

Instructions in this article apply to Windows 10, 8, 7, Vista, and XP.

How to See Active Network Connections (Windows)

How to Disable A Network Connection

Disabling and re-enabling network connections is done through Control Panel.

In Windows 10, Windows 8, Windows 7, and Windows Vista, select Network & Internet. Alternatively, you can right-click the internet icon in the taskbar and select Open Network & Internet settings.

In Windows XP, change to Category view, select Network and Internet Connections > Network Connections, then skip to Step 4.

How to See Active Network Connections (Windows)

Select Network and Sharing Center.

How to See Active Network Connections (Windows)

Select Change adapter settings. In Windows Vista, choose Manage network connections.

How to See Active Network Connections (Windows)

In the Network Connections screen, right-click or tap-and-hold the connection you want to disable, then select Disable. The icon for the connection turns grey to show that it’s disabled.

How to See Active Network Connections (Windows)

If Disable doesn’t appear in the menu, the connection is disabled.

If prompted, confirm the action, or enter an admin password if you’re not logged in as an administrator.

The internet connection is disabled.

How to Enable A Network Connection

Enabling a network connection is similar, but you’ll use the Enable option instead.

Repeat Steps 1, 2, and 3 (from above) to access the Network Connections screen.

Right-click or tap-and-hold the connection you want to enable, and choose Enable.

How to See Active Network Connections (Windows)

If prompted, enter an admin password or confirm the action.

The icon is no longer gray, indicating that the connection is enabled.

Ashish Mundhra

02 May 2012

How to See Active Network Connections (Windows)

When you install an app on Android (I am sure, the example will hold for other smartphone platforms as well), you’ll have to agree to some list of permissions the app would require on your phone for proper functioning. If at all it needs to use your phone’s network connectivity, you will have to agree to a permission of Full Network Access.

Software for Windows on the other hand do not usually ask for such kind of special permissions. All they require is admin access at times, and they can do pretty much anything on your system from creating desktop icons to rebooting your system.

Coming to the point, the most damaging security threats to a system are through unsecured internet connectivity of some malware apps installed on the system. The first step to fight them is knowing them, and we will talk about just the right tool to help you do that.

ProcNetMonitor is a nifty Windows freeware that monitors your network connection in real-time, analyzes it and gives you information about how all the currently active process are using the network resources on your computer. To be more precise (for all the geeks out there), the tool shows all open network Ports (TCP/UDP) and active Network Connections to a remote host.

So let’s see how the tool works.

How to Use ProcNetMonitor to Monitor Network Activity

Download ProcNetMonitor archive package on your computer. The archive file contains both installer and portable version. I would recommend you extract and install the setup file as the portable version was not able to detect many ongoing windows processes correctly in my case and has limited features when compared to the installer. However, the irritating part in this process is a prompt to install Babylon toolbar which you should instantly ignore. Other than that, it’s a smooth process.

How to See Active Network Connections (Windows)

After installing the tool, launch it with administrative privileges. Once the tool loads up, you will see a list of all the currently active processes on your computer along with open port and active network connection. The process field by default displays all the processes whether they are using the internet connection or not. To filter only the processes that are using the network, click on check Show only Network Processes on the tool.

Things you can do with ProcNetMonitor

You can do four tasks on a process by selecting it and using the right-click context menu. Like, performing an online check on an unknown process to determine if it’s a virus or a legit windows process. If you spot a malware process, you can kill it from the context menu. File location and File properties open the respective windows for the process.

How to See Active Network Connections (Windows)

When you click on a process, you can see the ports it’s using to connect to the internet and the hosts the program is connected to. If a program is connected to more than one host system details of all the remote host will be displayed.

Finally, you can export the ProcNetMonitor as a HTML file using the export button.

Conclusion

The tool is a bit geeky no doubt, but it’s easier to use than what it looks like. There are many uses you can put the tool to like, hunt for suspicious processes that are draining your network connectivity, using it for your projects where you need to test network connection (that came as an engineering student) and much more.

Got any thoughts or ideas on this tool? Have you used this one or a similar software before? Tell us in the comments.

Last updated on 8 Feb, 2018
The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.

@howtogeek
Updated November 13, 2017, 5:25pm EDT

How to See Active Network Connections (Windows)

Your PC makes lots of Internet connections in a day’s business, and not all of them are necessarily sites you’re aware connections are happening with. While some of these connections are harmless, there is always a chance that you have some malware, spyware, or adware using your Internet connection in the background without your knowledge. Here’s how to see what’s going on under the hood.

We’re going to cover three ways you can view your PC’s active connections. The first uses the good old netstat command from PowerShell or the Command Prompt. Then, we’ll show you two free tools—TCPView and CurrPorts—that also get the job done and may be more convenient.

Option One: Check Active Connections with PowerShell (or Command Prompt)

This option uses the netstat command to generate a list of everything that has made an Internet connection in a specified amount of time. You can do this on any PC running Windows, from Windows XP Service Pack 2 all the way up to Windows 10. And, you can do it using either PowerShell or Command Prompt. The command works the same in both.

If you’re using Windows 8 or 10, fire up PowerShell as an administrator by hitting Windows+X, and then selecting “PowerShell (Admin)” from the Power User menu. If you’re using the Command Prompt instead, you’d also have to run that as an administrator. If you’re using Windows 7, you’ll need to hit Start, type “PowerShell” in the search box, right-click the result, and then choose “Run as administrator” instead. And if you’re using a version of Windows before Windows 7, you’ll need to run the Command Prompt as administrator.

How to See Active Network Connections (Windows)

At the prompt, type the following command, and then press Enter.

We’re using four modifiers on the netstat command. The –a option tells it to show all connections and listening ports. The –b option adds what application is making the connection to the results. The –f option displays the full DNS name for each connection option, so that you can more easily understand where the connections are being made. The 5 option causes the command to poll every five seconds for connections (to make it more easy to track what is going on). We’re then using the piping symbol “>” to save the results to a text file named “activity.txt.”

After issuing the command, wait a couple of minutes, and then press Ctrl+C to stop the recording of data.

How to See Active Network Connections (Windows)

When you’ve stopped recording data, you’ll need to open the activity.txt file to see the results. You can open the file in Notepad immediately from the PowerShell prompt by just typing “activity.txt” and then hitting Enter.

How to See Active Network Connections (Windows)

The text file is stored in the \Windows\System32 folder if you want to find it later or open it in a different editor.

How to See Active Network Connections (Windows)

The activity.txt file lists all processes on your computer (browsers, IM clients, email programs, etc.) that have made an Internet connection in the time during which you left the command running. This includes both established connections and open ports on which apps or services are listening for traffic. The file also lists which processes connected to which websites.

If you see process names or website addresses with which you are not familiar, you can search for “what is (name of unknown process)” in Google and see what it is. It’s possible we’ve even covered it ourselves as part of our ongoing series explaining various processes found in Task Manager. However, if it seems like a bad site, you can use Google again to find out how to get rid of it.

Option Two: Check Active Connections By Using TCPView

How to See Active Network Connections (Windows)

The excellent TCPView utility that comes in the SysInternals toolkit lets you quickly see exactly what processes are connecting to what resources on the Internet, and even lets you end the process, close the connection, or do a quick Whois lookup to get more information. It’s definitely our first choice when it comes to diagnosing problems or just trying to get more information about your computer.

Note: When you first load TCPView, you might see a ton of connections from [System Process] to all sorts of Internet addresses, but this usually isn’t a problem. If all of the connections are in the TIME_WAIT state, that means that the connection is being closed, and there isn’t a process to assign the connection to, so they should up as assigned to PID 0 since there’s no PID to assign it to.

This usually happens when you load up TCPView after having connected to a bunch of things, but it should go away after all the connections close and you keep TCPView open.

Option Three: Check Active Connections By Using CurrPorts

How to See Active Network Connections (Windows)

You can also use a free tool named CurrPorts to display a list of all currently opened TCP/IP and UDP ports on your local computer. It’s a bit more focused tool than TCPView.

For each port, CurrPorts lists information about the process that opened the port. You can close connections, copy a port’s information to the clipboard, or save that information to various file formats. You can reorder the columns displayed on the CurrPorts main window and in the files you save. To sort the list by a specific column, just click on the header of that column.

CurrPorts runs on everything from Windows NT up through Windows 10. Just note that there is a separate download of CurrPorts for 64-bit versions of Windows. You can find more information about CurrPorts and how to use it on their website.

Just like in Windows 8, Windows 10 allows your PC to categorize its network connections as either Public or Private.

How to See Active Network Connections (Windows)

The type of connection Windows thinks you have will determine how your PC interacts with other devices on the network.

The problem is that Windows assigns a public or private profile to your network connection when you first make the connection, which may result in users accidentally choosing the wrong label.

Situations may also change, requiring you to reclassify the location at a later date. In either case, having an incorrect network profile for your connection may cause security issues or prevent Windows features from working how you expect them to.

So here’s a look at public and private networks in Windows 10 Pro and how to configure them to match your environment.

What is a Public and Private Network in Windows 10?

Private connections are intended for the home or a closed office network, in other words, situations where you know and trust all of the other devices your PC may connect to.

While the way that Windows treats public and private network locations can be modified, by default private network connections allow for features such as device discovery, printer sharing, and the ability to see your PCs in the network browser.

By contrast, Public network locations are meant to cover any situation where you don’t know and trust all of the other devices, such as coffee shops, airports, or even office networks that don’t use good security practices and allow visitors to connect to the same network as employees.

In this case, Windows works to protect you from inadvertently connecting to other devices which may be malicious by turning off default sharing features and network broadcasts.

This doesn’t mean that you can’t connect to other devices or share files on a public network, it just means that Windows won’t automatically do it for you, requiring you to manually connect and authenticate to another device.

Identifying Network Profile in Windows 10

If you don’t know whether your network connection is currently labeled by Windows as public or private, you can find out by heading to Settings > Network & Internet.
How to See Active Network Connections (Windows)
There, make sure you’ve selected the Status tab on the sidebar and you’ll see your active network connection listed on the right.
How to See Active Network Connections (Windows)
In our example, our Ethernet connection is identified as a public network. However, since this PC is located at the office where we used a closed network, it’s better to change its label to a private network.

How do I change from Public to Private Network in Windows 10?

To change your network location type from public to private (or vice versa), stay on the same Network & Internet settings page described above and look for your network connection in the sidebar on the left.

In our example we’re using a desktop PC with a wired Ethernet connection, so we’ll choose Ethernet. For laptops or desktops with wireless cards, look for Wi-Fi.
How to See Active Network Connections (Windows)
Note that Microsoft has and will continue to make significant changes to Windows 10. This tip and its screenshots reference the most current build of the operation system as of the date of publication (Version 1803, Build 17134) but steps may change in future releases.

Select the appropriate Ethernet or Wi-Fi entry and you’ll see a list of all of your connections of that type (in our example, we only have a single connection). Click on the desired connection to see its properties.
How to See Active Network Connections (Windows)
At the top, you’ll see a section labeled Network Profile. Click the correct public or private location to make the change. In our case, we’ll change from Public to Private. Once you’re done, you can close Settings or hit the back button in the upper-left corner to return to the Status page and verify the change.

How to Change from Public to Private Network in Windows 8 and Windows 8.1

In Windows 8.1, follow these instructions:

  1. open the Charms bar then click Change PC Settings at the bottom of your screen.
  2. Then click Network
  3. From the list of Network connections, choose the appropriate connection, such as wireless (if you are using WiFi) or ethernet.
  4. If switching to a private network, turn on the Find devices and content which you will want to be turned OFF for a public network and ON for a private network.

For Windows 8 follow these instructions:

  1. First, click Open Network and Sharing Center
  2. Next, you can change the network from private to public or from public to private.
  3. Click Change advanced sharing settings in the left-hand navigation.
  4. For a private network, Change advanced sharing settings should have the following settings: Turn on network discovery,Turn on file and printer sharing, and Allow Windows to manage homegroup connections.
  5. For a public network, the above should Turn off network discovery and Turn off file and printer sharing.
  6. Then, go back to Settings >Network >Turn sharing on or off
  7. Finally, choose Yes if you want your network to be treated like a private network and No if you want it to be treated like a public network, which will finalize the settings change you are making.

If you found this artilce useful, you might want to check out other TechJunkie articles such as these:

Do you have any tips and tricks for changing your network from private to public and from public to private? If so, please leave us a comment below!

W henever a client connects to a server via network, a connection is established and opened on the system. On a busy high load server, the number of connections connected to the server can be run into large amount till hundreds if not thousands. Find out and get a list of connections on the server by each node, client or IP address is useful for system scaling planning, and in most cases, detect and determine whether a web server is under DoS or DDoS attack (Distributed Denial of Service), where an IP sends large amount of connections to the server. To check connection numbers on the server, administrators and webmasters can make use of netstat command.

Below is some of the example a typically use command syntax for ‘netstat’ to check and show the number of connections a server has. Users can also use ‘man netstat’ command to get detailed netstat help and manual where there are lots of configurable options and flags to get meaningful lists and results.

netstat -na
Display all active Internet connections to the servers and only established connections are included.

netstat -an | grep :80 | sort

Show only active Internet connections to the server at port 80 and sort the results. Useful in detecting single flood by allowing users to recognize many connections coming from one IP.

netstat -n -p|grep SYN_REC | wc -l
Let users know how many active SYNC_REC are occurring and happening on the server. The number should be pretty low, preferably less than 5. On DoS attack incident or mail bombed, the number can jump to twins. However, the value always depends on system, so a high value may be average in another server.

netstat -n -p | grep SYN_REC | sort -u
List out the all IP addresses involved instead of just count.

netstat -n -p | grep SYN_REC | awk ‘‘ | awk -F: ‘
List all the unique IP addresses of the node that are sending SYN_REC connection status.

netstat -ntu | awk ‘‘ | cut -d: -f1 | sort | uniq -c | sort -n
Use netstat command to calculate and count the number of connections each IP address makes to the server.

netstat -anp |grep ‘tcp\|udp’ | awk ‘‘ | cut -d: -f1 | sort | uniq -c | sort -n
List count of number of connections the IPs are connected to the server using TCP or UDP protocol.

netstat -ntu | grep ESTAB | awk ‘‘ | cut -d: -f1 | sort | uniq -c | sort -nr
Check on ESTABLISHED connections instead of all connections, and displays the connections count for each IP.

netstat -plan|grep :80|awk <'print $5'>|cut -d: -f 1|sort|uniq -c|sort -nk 1
Show and list IP address and its connection count that connect to port 80 on the server. Port 80 is used mainly by HTTP web page request.

Many time in troubleshooting or needing to view network traffic information or connection information, seeing your TCP/IP connections in Windows can provide valuable insight into problems or issues that may be going on in Windows with connectivity. Also, viewing connection information is a great way to narrow down on possible backdoor traffic to a workstation if malware is suspected. In this guide, we want to look at several tools and utilities to both view connection information as well as kill TCP connections in Windows that may be problematic or malicious.

Windows itself has many really nice tools built-in that will enable you to see TCP and UDP connections right out of the box via the commandline. Especially the later versions of Windows which include Powershell expand these capabilities as well.

Commandline Tools

Powershell

How to See Active Network Connections (Windows)

With powershell we have a whole new array of commandlets to peer inside of and control what is going on with Network connections in Windows. There are two commands in general among others that provide really powerful monitoring inside of Powershell and that is the get-nettcpconnection and get-udpendpoint. Take a look at the whole list of new powershell commands for monitoring and controlling TCP activity here: https://technet.microsoft.com/en-us/library/hh826123.aspx

Get-NetTcpConnection – cmdlet gets current TCP connections. Use this cmdlet to view TCP connection properties such as local or remote IP address, local or remote port, and connection state.

Get-NetUDPEndpoint – gets current statistics for a UDP endpoint. The cmdlet returns UDP end point properties, such as local and remote UDP ports. If you do not specify any parameters, the cmdlet gets statistics for all UDP end points.

Netstat

Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters, netstat displays active TCP connections.

Below the command was issued netstat -ano

With the PID information you see above in the netstat output, you can use this number to correlate with PID information in Task Manager to identify the exact process and kill if need be.

Wkillcx is a small command-line utility to close any TCP connection under Windows XP/Vista/Seven as well as Windows Server 2003/2008. This is a great little commandline program that allows you to kill the remote IP:port connection information without knowing the PID. You simply issue the command, feed the appropriate connection information, it searches for that connection and kills it. Download wkillcx here: https://wkillcx.sourceforge.net/

GUI Tools

Along with the commandline tools included in Windows there are also a couple of really nice GUI tools that allow ones to see TCP activity as well as kill those TCP connections via killing the process that is spawning the TCP connections.

TCPView

TCPView is a Windows SysInternals Tool that is designed to basically show detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections. The download of the utility also includes a commandline version of the tool in tcpvcon. Download TCPView here: https://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

How to See Active Network Connections (Windows)

Another really nice feature of TCPView is that you can right-click on any connection entry and then Kill the process that is using it:

How to See Active Network Connections (Windows)

Microsoft Message Analyzer 1.0

Microsoft Message Analyzer is a new tool for capturing, displaying, and analyzing protocol messaging traffic and other system messages. This is a relatively new tool that also can import data from the legacy Microsoft Network Protocol Analyzer 3.4.

This is a more full blown protocol analyzer, but can do many of the basic things we are referring too in the above guide. Download the Microsoft Message Analyzer here: https://www.microsoft.com/en-us/download/details.aspx?id=40308

Final Thoughts

Using the tools listed above, one can view network connection information via either the commandline or using GUI tools. This is extremely helpful when you are tracking down a rogue connection or a problematic process that has network hooks.

Windows usually detects the presence of a network adapter automatically; typically, you don’t have to install device drivers manually for the adapter. When Windows detects a network adapter, Windows automatically creates a network connection and configures it to support basic networking protocols. You may need to change the configuration of a network connection manually, however.

The following steps show you how to configure your network adapter on a Windows 10 system:

How to See Active Network Connections (Windows)

1 Click the Start icon (or press the Start button on the keyboard), and then tap or click Settings.

The Settings page appears.

How to See Active Network Connections (Windows)

2 Click Network & Internet.

The Network & Internet page appears.

How to See Active Network Connections (Windows)

3 Click Ethernet.

The Ethernet settings page appears.

How to See Active Network Connections (Windows)

4 Click Change Adapter Options.

The Network Connections page appears. This page lists each of your network adapters. In this case, only a single wired Ethernet adapter is shown. If the device has more than one adapter, additional adapters will appear on this page.

How to See Active Network Connections (Windows)

5 Right-click the connection that you want to configure and then choose Properties from the contextual menu that appears.

This action opens the Ethernet Properties dialog box.

How to See Active Network Connections (Windows)

6 To configure the network adapter card settings, click Configure.

The Properties dialog box for your network adapter appears. This dialog box has seven tabs that let you configure the adapter:

  • General: Shows basic information about the adapter, such as the device type and status.
  • Advanced: Lets you set a variety of device-specific parameters that affect the operation of the adapter.
  • About: Displays information about the device’s patent protection.
  • Driver: Displays information about the device driver that’s bound to the NIC and lets you update the driver to a newer version, roll back the driver to a previously working version, or uninstall the driver.
  • Details: With this tab, you can inspect various properties of the adapter such as the date and version of the device driver. To view the setting of a particular property, select the property name from the drop-down list.
  • Events: Lists recent events that have been logged for the device.
  • Power Management: Lets you configure power management options for the device.

When you click OK to dismiss the dialog box, the network connection’s Properties dialog box closes and you’re returned to the Network Connections page. Right-click the network adapter and choose Properties again to continue the procedure.

7 Review the list of connection items listed in the Properties dialog box.

  • Client for Microsoft Networks: This item is required if you want to access a Microsoft Windows network. It should always be present.
  • File and Printer Sharing for Microsoft Networks: This item allows your computer to share its files or printers with other computers on the network.This option is usually used with peer-to-peer networks, but you can use it even if your network has dedicated servers. If you don’t plan to share files or printers on the client computer, however, you should disable this item.
  • Internet Protocol Version 4 (TCP/IPv4): This item enables the client computer to communicate by using the version 4 standard TCP/IP protocol.
  • Internet Protocol Version 6 (TCP/IPv6): This item enables version 6 of the standard TCP/IP protocol. Typically, both IP4 and IP6 are enabled, even though most networks rely primarily on IP4.

8 If a protocol that you need isn’t listed, click the Install button to add the needed protocol.

A dialog box appears, asking whether you want to add a network client, protocol, or service. Click Protocol and then click Add. A list of available protocols appears. Select the one you want to add; then click OK.

9 To remove a network item that you don’t need (such as File and Printer Sharing for Microsoft Networks), select the item, and click the Uninstall button.

For security reasons, you should make it a point to remove any clients, protocols, or services that you don’t need.

How to See Active Network Connections (Windows)

10 To configure TCP/IP settings, click Internet Protocol (TCP/IP); click Properties to display the TCP/IP Properties dialog box; adjust the settings; and then click OK.

The TCP/IP Properties dialog box lets you choose among these options:

  • Obtain an IP Address Automatically: Choose this option if your network has a DHCP server that assigns IP addresses automatically. Choosing this option dramatically simplifies administering TCP/IP on your network.
  • Use the Following IP Address: If your computer must have a specific IP address, choose this option and then type the computer’s IP address, subnet mask, and default gateway address.
  • Obtain DNS Server Address Automatically: The DHCP server can also provide the address of the Domain Name System (DNS) server that the computer should use. Choose this option if your network has a DHCP server.
  • Use the Following DNS Server Addresses: Choose this option if a DNS server isn’t available. Then type the IP addresses of the primary and secondary DNS servers.
  • ⎙ Print
  • + Share This

This chapter is from the book

This chapter is from the book

This chapter is from the book 

In This Chapter

  • Connecting to wired networks and wireless networks
  • Managing your network connections, using VPNs, and mapping network drives
  • Diagnosing and repairing connection problems

To get the most out of your computer, you’ll want to connect it to the Internet. Normally, the easiest way to do this is to connect it to a local area network that is connected to the Internet. For example, a typical home broadband connection includes a switch or router to which you can connect your computers and other devices (such as smartphones or tablets) so that they can access the Internet and also share files, printers, and other devices with each other locally. Similarly, your workplace likely has a network that enables the computers and devices to connect to servers, printers, and other shared resources, and to access the Internet.

This chapter shows you how to connect your computer to a wired network or to a wireless network, how to connect to network folders, and how to deal with network problems. You also learn how to connect your computer to a virtual private network, or VPN, in order to establish a secure connection to a server across the Internet, and how to share your computer’s Internet connection with others.

Connecting to a Wired Network

To connect to a wired network, plug one end of an Ethernet cable into the Ethernet port on your computer and the other end into an Ethernet port on a switch, router, or hub.

For many networks, making the physical connection is all you need to do, because Windows tries to configure the connection automatically when it detects the cable. If the network uses DHCP (see the nearby sidebar), Windows can apply suitable settings, and your computer can start using the network.

Windows doesn’t display any fly-out or dialog box when it connects successfully to a network, so you’ll probably want to check that the connection is working. Usually, the easiest way is to open a web browser, such as Microsoft Edge; if it displays your home page, all is well; but if it displays an error, you will need to configure the connection.

See the section “Configuring IP Settings Manually,” later in this chapter, for instructions on configuring a wired connection manually.

Why Do You Sometimes Need to Configure Network Settings?

To connect to a network, your computer must have suitable Internet Protocol (IP) settings: the IP address, the gateway address, the network prefix length, and the addresses of the domain name system (DNS) server it should use. Typically, the computer receives these settings automatically from the network, but you can also set them manually if necessary.

Most wired and Wi-Fi networks use Dynamic Host Configuration Protocol (DHCP), a protocol in which a DHCP server or DHCP allocator automatically provides IP addresses and network configuration information to computers that connect. DHCP is an efficient way of sharing available IP addresses among computers, so it’s widely used. But some networks use static IP addresses instead, assigning a particular address to each computer. For such networks, you must configure your computer’s IP settings manually.

The quick and easy way to disconnect from a wired network is to unplug the Ethernet cable from your computer. Alternatively, you can leave the cable connected but disable the Ethernet adapter. To do this, right-click or long-press the Network icon in the notification area and click Open Network and Sharing Center. Next, click Change Adapter Settings, and then right-click or long-press Ethernet and click Disable on the shortcut menu.

Question

I have a set up with two high speed cameras connecting to a windows 10 lenovo laptop with an ethernet connection. The problem I am having is that when the ethernet is plugged in, the wifi is automatically disabled, meaning the laptop can’t have internet access and talk to the cameras. When the ethernet is connected, connecting to the wifi shows the message ‘Your network administrator does not allow simultaneous connections to your workplace’.

How do I go about disabling this restriction? I have searched for a group policy and cannot find any articles which suggest a fix for the problem.

I though the group policy ‘Prohibit connection to non-domain networks when connected to domain authenticated network’ would work but still having the problems.

Thanks in advance

All replies

Yes, I’m afraid that system has not a related group policy.

But this is a simple adjustment to Ethernet LAN priority settings in Windows 10.

Follow these simple steps below and both devices will be functioning concurrently.

1. Go to network and sharing center in control panel.

2. Select change adapter settings

3. Right click on your Ethernet device and select properties on popup menu.

4. In properties menu, click configure button.

5. When configure menu, select advanced tab.

6. In advanced menu, under property list, look for “Priority & Vlan” and select it.

7. Look in value list to the right and select disable toggle.

8. Click Ok, on your way back out of menus and wait 15 seconds until system updates new value.

You have just disabled your Ethernet LAN priority so it will function together with your WIFI.

Hope it will be helpful to you

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Proposed as answer by Eric0502 Tuesday, April 24, 2018 10:05 AM

Thank you for your response.

I found a solution in the end, which was disabling ‘IPsec Policy Agent’ service and setting the registry key HKLM\Software\Policies\Microsoft\Windows\WcmSvc\GroupPolicy!fMinimizeConnections to 0.

  • Proposed as answer by Eric0502 Tuesday, April 24, 2018 10:05 AM

Glad to hear that you have found a solution and thank you for sharing it here, it will be helpful to other community members who have same questions.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Proposed as answer by Carl Fan Microsoft contingent staff Tuesday, April 24, 2018 1:51 PM

make sure you also disable the policy blocking non domain network;

“Prohibit connection to non-domain networks when connected to domain-authenticated network”

GPO Path: Computer Configuration/Administrative Templates/Network/Windows Connection Manager/

RegKey: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy fBlockNonDomain

I had a same issue in HP probook 450 and fix it. There is a setting in BIOS called LAN/WAN auto switch. You Have to disable it.

I am studying Computer Science at a university where I have 100mbps ethernet and 100mbps wifi available in my dorm. I have always been using the ethernet for everything as its way more stable when downloading games than wifi which fluctuates a lot. I wanted to combine both of them to increase my speed and looked online and found that i have to make a network bridge so that both the connections get combined. The steps are as below:

  1. Go to Control Panel and click Network and Internet.
  2. Click Network and Sharing Center.
  3. On the left column click change adapter settings.
  4. Select both the connections and right click to see options. Click network bridge.
  5. Windows will automatically make a network bridge and you are done.

Every connection in Windows 10 has its own network name. Generally, Windows 10 assigns generic names like Network 1, Network 2, etc., to all your network connections. If you have a router, then Windows might use the name you assigned in the router. When using multiple networks, the default names can be a bit hard to remember or recognize one network from the other. In those situations, changing the network name is quite helpful.

However, you will not find any option whatsoever in the Settings app or Control Panel to change the network name. You have to use the Local Security Policy or Windows Registry to change the network name in Windows 10. It is quite easy to do. Let me show you how to rename a network in Windows 10.

Jump to:

Know Your Current Network Name

Before proceeding, it is better to know your current network name. This helps in finding the target network when you want to change its name.

To find your current network name, click on the network icon in the taskbar. You will see the network name in the network connections flyout menu. In my case, the network name is “Network 2”.

Alternatively, you can also find the network name from the control panel. To do that, search for “Control Panel” in the start menu and open it. Now, go to “Networking and Sharing Center.” You will see the network name in bold letters under the “View your active networks” section.

Once you know your current network name, proceed to rename the network name.

1. Change Windows 10 Network Name via Local Security Policies

Note: Local Security Policies is only available for Windows 10 Pro and Enterprise users. If you are using Windows 10 Home version, follow the second method. i.e, registry method.

Local Security Policies is a built-in management console that allows you to change many advanced security settings in Windows 10. One of those settings allow you to change the network name.

1. To open the Local Security Policy, we are going to use the Run command. So, press Win + R , type secpol.msc in the blank field and press Enter to open Local Security Policy.

2. In the Local Security Policy window, select “Network List Manager Policies” on the left panel. On the right panel, find the network you what change the name for and double-click on it.

3. The above action will open the network properties window. Here, select the radio option “Name” and type your new network name in the blank field. Click on the “Apply” and “Ok” buttons to save changes.

That is it. As soon as you save the changes, the network name will be changed instantly. There is no need to reboot Windows. You can verify the network name change by clicking on the network icon in the taskbar.

You can also see the changed network name in the control panel’s networking and sharing center.

2. Change Network Name in Windows 10 via Registry Editor

Warning: before making any changes to the registry, please create a quick registry backup so that you can restore the registry as and when needed.

If you are using Windows 10 Home version, you need to use the Windows Registry to change the network name in Windows 10. Thankfully, it is quite easy to change the network name using Windows Registry.

1. To open the Windows Registry, press Win + R , type regedit in the blank field and press Enter on your keyboard.

2. In the registry editor, go to the following location. Windows 10 users can simply copy and paste the below path in the registry editor’s address bar and then press Enter to go to the target key.

3. Under the Profiles folder, you will see a few more folders with random alphanumerics. Each folder represents a network connection in your system. When you select a folder under the Profiles folder, you will see the network name on the right panel next to “ProfileName”. In my case, the network name I’m looking for is “Network 2” and that is represented in the second folder under the Profiles folder.

4. Now, double-click on the “ProfileName” value on the right panel.

5. Enter the new name in the Value Data field and click on the “Ok” button.

6. Once that is done, close the registry editor by clicking on the “X” icon appearing on the top-right corner.

Generally, the changes are instant. If not, reboot Windows 10. After restarting, you will see the new network name when you click on the network icon in the taskbar and in the control panel too.

As you can see it is not that hard to rename a network in Windows 10.

Network Connections is the most commonly used Control Panel applet for network administrators. From there you can view and manage all your wired / wireless adapters in one place. In this tutorial we’ll show you 3 quickest ways to open Network Connections in Windows 10.

How to See Active Network Connections (Windows)

Method 1: Open Network Connections via Run or Command Prompt

Press the Windows key and the R key at the same time to open the Run box. Type ncpa.cpl and hit Enter and you can access Network Connections immediately.

How to See Active Network Connections (Windows)

A similar way of opening Network Connections is to run ncpa.cpl at the Command Prompt.

How to See Active Network Connections (Windows)

Method 2: Open Network Connections via Taskbar

Right-click the network icon which is located at the notification area of taskbar, and then select “Open Network & Internet settings” from the popup menu.

How to See Active Network Connections (Windows)

In the resulting pop-up window, click the “Change adapter options” in the right pane.

How to See Active Network Connections (Windows)

It will open Network Connections in no time.

Method 3: Open Network Connections via Control Panel

Open the Control Panel in category view, click the “View network status and tasks” link beneath the “Network and Internet” heading.

How to See Active Network Connections (Windows)

In the resulting window, click “Change adapter settings” on the left-hand side.

How to See Active Network Connections (Windows)

Now you can view a list of network connections on your system.

Windows features a Bridge Connections command, which allows you to access two separate networks on a single PC. For example, if you have a laptop computer with both wired and wireless connections and you’re using both, you can bridge those connections so that your laptop can access computers on both networks.

Yes, this type of situation might be rare. But Windows lets you do it.

To bridge connections, follow these steps:

Open the Network Connections window.

Select the network connections to bridge.

To select more than one connection at a time, press and hold the Ctrl key as you click each one.

Right-click the selected icons and choose the Bridge Connections command.

In Windows Vista, click the Continue button or type the administrator’s password if you’re prompted to do so.

Dismiss the confirmation dialog box if one appears.

There are a few times when this trick doesn’t work. Windows doesn’t, for example, bridge a connection between a local network and the Internet, which would be a security risk. Neither does bridging work when you’re using Internet Connection Sharing, which is a way of sharing your PC’s Internet connection directly with another PC by hooking the two computers together with an Ethernet cable.

To break up a network bridge, open the Network Connections window, right-click the bridge, and choose Delete from the shortcut menu.

How to quickly estimate the current number of user connections (sessions) to the IIS sites on webserver running on Windows Server? Such information will allow to determine and predict the load on the server, choose the best time for the maintenance and updates of the website, predict the IIS server’s load when the number of users increases.

The easiest way to determine the number of active user sessions on the IIS Web site is to use the performance counters in Windows Performance Monitor.

Open the Performance Monitor console by running the perfmon command and go the Performance monitor section (Monitoring Tools — > Performance Monitor).

Then you need to add the necessary counters to the monitor window (by default, the total CPU usage counter is displayed, but you can remove it). To add a new counter, click the green button on the toolbar (you can see it on the screenshot) or press Ctrl+N on the keyboard.

How to See Active Network Connections (Windows)

In the list of available counters, find and expand the Web Service group. In this category, we are interested in three counters:

  • Current Anonymous Users – the number of anonymous IIS users;
  • Current Non-Anonymous Users – the number of authorized IIS users;
  • Current Connections – total number of active connections on the IIS server.

Select the desired counter and in the Instances of selected objects choose one or more IIS websites for which you want to display connection information. The information about users of all websites on the server is stored in the _Total instance. Now you only have to click the Add >> button to move the counter to the list of the counters to be added in the right pane.

How to See Active Network Connections (Windows)

Add all the necessary counters in the same way and click OK.

How to See Active Network Connections (Windows)

Now the information about the number of user sessions in the Performance Manager console is being displayed in the real time (by default, the counter values are displayed as linear graphs). If you select any of the counters in the bottom pane, you can view its last, average, minimum or maximum value for a given period of time.

You can add custom performance counters to this console and save them in a separate view, which can be used later to quickly access the web server load data.

You can access the IIS performance counters from PowerShell. To do this, you can use the Get-Counter cmdlet. The list of all available Web Service performance counters can be displayed as follows:

(Get-Counter -ListSet ‘Web Service’).counter

How to See Active Network Connections (Windows)

To get information about the current number of active connections on the IIS server (the counter \Web Service(*)\Current Connections), use this command:

Get-Counter -Counter “\Web Service(*)\Current Connections”

As you can see, this command returned both the total number of connections to the IIS server and the statistics for each of the sites.

  • The values of several counters can be displayed if you specify them separated by the commas;
  • With the –Continuous option, the information about the value of the counter is constantly displayed in the console until you’ll interrupt it using CTRL+C.

You can get the number of active sessions for a specific IIS site. For example, to get the current number of connections on a site named Site1, run the following command:

Get-Counter “web service(Site1)\current connections” -ComputerName web-srv01

You can specify the name of the server on which the counter value is checked. When you are checking the number of connections on the site locally, specifying localhost is not allowed:

In order not to specify the server name each time, you can use the environment variable COMPUTERNAME:

Get-Counter “web service(Site1)\current connections” -ComputerName $env:COMPUTERNAME

To get the numeric value of the counter “current connections” of the entire IIS web server (total users on IIS), you can use this command:

((Get-Counter -Counter ‘web service(_total)\current connections’ -computer $env:COMPUTERNAME) | Select-Object -Expand countersamples).Cookedvalue

Let’s try using a simple script to create several additional sessions with our site and check the counter value. You can increase the number of connections to the IIS website using the Invoke-WebRequest cmdlet, or you can simply open several windows in the browser:

$counter = 20
for($i=1;$i -le $counter;$i++) <
$SiteAdress = “http://localhost:9666/”
Start-Process $SiteAdress
>

Check the value of the current connections counter and make sure that it increases.

If several IIS sites are running on the server, and you need to get the number of connections to each of them in a form of table, you can use this script (to receive data from IIS into PowerShell, you need to load the WebAdministration module):

import-module webadministration
function get-CurrentConnection($Site) <
Get-Counter “web service($Site)\current connections,web service($Site)\ Bytes Received/sec,web service($Site)\Bytes Sent/sec” -ComputerName $env:COMPUTERNAME
>
$IISsites = dir IIS:\Sites | Select Name
$CurrentConnection = @()
foreach ($site in $IISsites)
<
Write-Host $site
$ConnCount = New-Object psobject | get-CurrentConnection -Site $site.name
$CurrentConnection += $ConnCount
>
$CurrentConnection|out-gridview

How to See Active Network Connections (Windows)

You can also display the numerical values of connection counters for all sites (the first value is the total number of connections to IIS):

Get-wmiObject -class Win32_PerfRawData_W3SVC_WebService | select-object -expand currentconnections

You can display information about the amount of received/sent data for each site or the entire web server using the Web service(sitename)\Bytes Received/sec and Web service(sitename)\Bytes Sent/sec counters.

So, we looked at a way to get information about the load on sites running on the IIS web server.

Does somebody knows how to close a TCP or UDP socket for a single connection via windows command line?

Googling about this, I saw some people asking the same thing. But the answers looked like a manual page of netstat or netsh commands focusing on how to monitor the ports. I don’t want answers on how to monitor them (I already do this). I want to close/kill them.

EDIT, for clarification: Let’s say that my server listens TCP port 80. A client makes a connection and port 56789 is allocated for it. Then, I discover that this connection is undesired (e.g. this user is doing bad things, we asked them to stop but the connection didn’t get dropped somewhere along the way). Normally, I would add a firewall to do the job, but this would take some time, and I was in an emergency situation. Killing the process that owns the connection is really a bad idea here because this would take down the server (all users would lose functionality when we just want to selectively and temporally drop this one connection).

17 Answers 17

Yes, this is possible. You don’t have to be the current process owning the socket to close it. Consider for a moment that the remote machine, the network card, the network cable, and your OS can all cause the socket to close.

Consider also that Fiddler and Desktop VPN software can insert themselves into the network stack and show you all your traffic or reroute all your traffic.

So all you really need is either for Windows to provide an API that allows this directly, or for someone to have written a program that operates somewhat like a VPN or Fiddler and gives you a way to close sockets that pass through it.

There is at least one program (CurrPorts) that does exactly this and I used it today for the purpose of closing specific sockets on a process that was started before CurrPorts was started. To do this you must run it as administrator, of course.

Note that it is probably not easily possible to cause a program to not listen on a port (well, it is possible but that capability is referred to as a firewall. ), but I don’t think that was being asked here. I believe the question is “how do I selectively close one active connection (socket) to the port my program is listening on?”. The wording of the question is a bit off because a port number for the undesired inbound client connection is given and it was referred to as “port” but it’s pretty clear that it was a reference to that one socket and not the listening port.

H ow do I check network connections under Linux using command line options?

You need to use any one of the following tool or command under Linux to check network connections including their state, source/destination, and addresses and bandwidth usage etc:

How to See Active Network Connections (Windows)

  1. ss command: It dump socket (network connection) statistics such as all TCP / UDP connections, established connection per protocol (e.g., display all established ssh connections), display all the tcp sockets in various state such as ESTABLISHED or FIN-WAIT-1 and so on.
  2. netstat command: It can display network connections, routing tables, interfaces and much more.
  3. tcptrack and iftop commands: Displays information about TCP connections it sees on a network interface and display bandwidth usage on an interface by host respectively.

Display Currently Established, Closed, Orphaned and Waiting TCP sockets, enter:

# ss -s
Sample outputs:

Or you can use the netstat command as follows:
# netstat -s
Sample outputs:

Display All Open Network Ports

Use the ss command as follows:
# ss -l
Sample outputs:

OR Use the netstat command as follows:
# netstat -tulpn
Sample outputs:

Display All TCP Sockets

Type the ss command as follows:
# ss -t -a
Or use the netstat command as follows:
# netstat -nat

Display All UDP Sockets

Type the ss command as follows:
# ss -u -a
Or use the netstat command as follows:
# netstat -nau

lsof Command

You can use the lsof command follows to list more information about open ports:
# lsof -i :portNumber
# lsof -i tcp:portNumber
# lsof -i udp:portNumber
# lsof -i :80 | grep LISTEN

View Established Connections Only

Use the netstat command as follows:
# netstat -natu | grep ‘ESTABLISHED’

Say Hello To tcptrack

The tcptrack command displays the status of TCP connections that it sees on a given network interface. tcptrack monitors their state and displays information such as state, source/destination addresses and bandwidth usage in a sorted, updated list very much like the top command.
# tcptrack -i eth0
Sample outputs:

How to See Active Network Connections (Windows)

Fig.01: tcptrack in Action

iftop command

The iftop command listens to network traffic on a given network interface such as eth0, and displays a table of current bandwidth usage by pairs of hosts:
# iftop -i eth1
It can display or analyses packet flowing in and out of the 192.168.1.0/24 network:
# iftop -F 192.168.1.0/24
Sample outputs:

How to See Active Network Connections (Windows)

Fig.02: iftop command in action

Recommended readings:

Please go through the following articles for more information:

1 minute read, July 23, 2013

How to See Active Network Connections (Windows)

Windows makes a mess of all the network adapters when installing NIC cards. Sometimes, you remove network adapters, and you’re left with something like “Local Area Network 3” that can’t be renamed back to “Local Area Network”. The problem is, Windows remembers the previous adapter (even if it is physically removed), so you can’t rename the adapter, otherwise it would conflict with previously named adapters. View & remove all previously (non-connected) NIC adapters first start by opening a command prompt:

  • Start >Run…. Then type cmd.exe. (Be sure to run the Command Prompt as Administrator)
  • In the command window, type set DEVMGR_SHOW_NONPRESENT_DEVICES=1
  • Next, type devmgmt.msc
  • Go to View > Show Hidden Devices How to See Active Network Connections (Windows)

Expand the “Network adapters” entry and you should see all network adapters previously installed (but no longer present) in Windows. Select the network adapters you’re no longer using and “Uninstall” them. Usually, old or unused network adapters have icons that are “grayed out” as shown below:

How to See Active Network Connections (Windows)

After cleaning up your unused network adapters, you should now be able to rename the network adapters back to “Local Area Connection”.

Extra Tip 1: Using the “Network and Sharing Center”, click on the icon to change the icon and network name.

Extra Tip 2: Start “Local Security Policy”. Go to “Network List Manager Polices”, and you’ll be able to assign profiles to these networks.

Extra Tip 3: Click on an “Unidentified network”s icon, and click “Merge or delete network locations” to delete any previously remembered “networks”.

Goal: Using netstat to view information about connections

Prerequisites: Access to a Linux console

Lets start with the basics. The netstat command is quite useful for checking connections to your machine. If we wanted to see ALL of the connections (which i really recommend you don’t do unless you’re trying to debug something and then you should probably pipe it to a file) we could use the “netstat -a” command.

Using netstat -a will give you something sort of like this (this is a segment of my server):

As you can see it does name resolving for us and all that good stuff. Sometimes very hand but that’s not what this is about. We want to get some solid numbers so we can take a broader perspective. To do this we can use the following command: netstat -an | wc -l

This will show us a count of all connections that we presently have to our machine. But we can take this one step further even. Lets say you only wanted to see traffic comming across port 80 (standard http). We can grep our netstat then count it like so: netstat -an | grep :80 | wc -l

Finally, lets take a look at the big picture in a category form. It is often extremely useful to see what those connections are doing, especially when you think you might just have tons of open connections that are idle and are trying to tweak your settings. It’s been known to happen where you have a really busy web server for instance, and maybe it’s running a lot of database connections to the same box, then stopping. That often causes things like the TIME_WAIT to pile up and a large number for any of these may be an indication that you need to adjust your tcp timeout settings.

So there you have it. A quick way to return counts on your connections in your linux environment. (Note the netstat command is standard on most operating systems, including windows, but you may need to use some other way to count your results)

Occasionally, when using netstat you may only care about ports that you are listening on. This is especially important if you are running a server that isn’t behind a firewall because it helps you determine what you may be vulnerable to that you aren’t aware of. using the netstat -l provides us with an excellent way to view this information.

Another very common thing and powerful tool that netstat has built in is to show you network statistics in an overview fashion. If you’re just trying to get a good idea about packet statistics then the netstat -s command may be what you’re looking for. Here is some sample output. Keep in mind that netstat -s will show statistics broken down by protocol, so the fewer protocol stacks you are running the more compacted this summary will be.

Another extremely useful tool for server administrators who are trying to track down processes that have run amuck is the netstat -p command. This returns the PID of the process that has the connection. It’s also quite useful if you’ve got someone abusing a PID and you need to find out what IP it is so that you can get in touch with that individual or to block connections from that IP in the future. Here’s some sample output from netstat -p.

Applies To: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows 8

Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters, netstat displays active TCP connections. For examples of how this command can be used, see Examples.

Syntax

Parameters

Displays all active TCP connections and the TCP and UDP ports on which the computer is listening.

Displays Ethernet statistics, such as the number of bytes and packets sent and received. This parameter can be combined with -s.

Displays active TCP connections, however, addresses and port numbers are expressed numerically and no attempt is made to determine names.

Displays active TCP connections and includes the process ID (PID) for each connection. You can find the application based on the PID on the Processes tab in Windows Task Manager. This parameter can be combined with -a, -n, and -p.

Shows connections for the protocol specified by Protocol. In this case, the Protocol can be tcp, udp, tcpv6, or udpv6. If this parameter is used with -s to display statistics by protocol, Protocol can be tcp, udp, icmp, ip, tcpv6, udpv6, icmpv6, or ipv6.

Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP, and IP protocols. If the IPv6 protocol is installed, statistics are shown for the TCP over IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols. The -p parameter can be used to specify a set of protocols.

Displays the contents of the IP routing table. This is equivalent to the route print command.

Redisplays the selected information every Interval seconds. Press CTRL+C to stop the redisplay. If this parameter is omitted, netstat prints the selected information only once.

Displays Help at the command prompt.

Remarks

Parameters used with this command must be prefixed with a hyphen () rather than a slash (/).

В В В В В В В В В В В В В Netstat provides statistics for the following:

The name of the protocol (TCP or UDP).

The IP address of the local computer and the port number being used. The name of the local computer that corresponds to the IP address and the name of the port is shown unless the -n parameter is specified. If the port is not yet established, the port number is shown as an asterisk (*).

The IP address and port number of the remote computer to which the socket is connected. The names that corresponds to the IP address and the port are shown unless the -n parameter is specified. If the port is not yet established, the port number is shown as an asterisk (*).

Indicates the state of a TCP connection. The possible states are as follows:

For more information about the states of a TCP connection, see RFC 793.

This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections.

Examples

To display both the Ethernet statistics and the statistics for all protocols, type:

To display the statistics for only the TCP and UDP protocols, type:

To display active TCP connections and the process IDs every 5 seconds, type:

To display active TCP connections and the process IDs using numerical form, type:

I recently listened to a radio station in frost wire and when I ended the application the radio was still playing. I wanted to see the session so I could terminate it. open connections and port.

  • Are you smarter than most IT pros? Take the Daily Challenge »
  • Install Offline Language Pack on Windows 10 1909
  • Fingerprint reader stop work after join to domain
  • Make Windows 10 think of External HDD as Internal one, to avoid USB.
  • ROM
  • CPU
  • RAM
  • GPU

5 Replies

look for a process still running and kill it.

netstat will also show you active connections and ports

I agree with Jared on that.

If you are looking for connections from other machines on your network you can look at your firewall. I use SonicWall and it gives you results similar to the netstat command but for every connection from your network to the Internet.

Also, sometimes apps are designed to go “minimize” to your system trey when you close them. You may just have to right click on it down there and tell it to quit or exit.

I use Sysinternals Suite – the program tcpview.exe easily lists all programs that have open Connections to anywhere else. It is simpler to locate the process that is acting up. Simple right click and terminate 😉

Btw. Sysinternals is a must for every WinAdmin (jm2c)

open sessions and port. why wouldn’t you just kill the Frostwire process?

Thank you all for your replies. In response to each post:

  1. used task manager to find process but there was nothing running associated with frostwire running after I closed the program. Netstat is good to show connections and ports but not enough info and I can’t stop or close it from there.
  2. I use the windows firewall now, used Comodo Firewall and Zone Alarm at one time and those had that option. “sometimes apps are designed to go “minimize” to your system trey when you close them” I agree and checked that 1st but not the issue.
  3. “I use Sysinternals Suite” yes, this was a big help as I did have this downloaded and forgot about it’s usefulness, this is great, thx!
  4. The process was killed and that was the issue, it kept playing, keeping the port open even after app was closed and no other process were active. “open sessions and port” ? Not sure where this is? Are you referring to two different locations? How do I navigate to the sessions and ports you mention?

Again, thank you all for your support and replies, I appreciate your time!

The help desk software for IT. Free.

Track users’ IT needs, easily, and with only the features you need.

One of our clients is using Windows 7 Pro as a pseudo-server. They are a small shop with about 10 PCs and a copier that scans to a share on the Windows 7 Pro server. Every couple of days they have to reboot the server because the scanner can’t connect to the server anymore. I’m suspecting this may be because of the concurrent connections limit of 20 on Windows 7 Pro.

I’d have though 20 would be enough connections for the number of devices they have but maybe something isn’t playing nice and letting go of a connection when it’s done.

We’ve worked with the copier vendor and the copier is fine as far as they can tell. As a test we set it to scan each individual user to their desktops rather than the server and they haven’t had a problem since but the owner really wants scans on the server.

My question is: Is there any way to view the number of concurrent connections actually being used at any given moment?

Before I can suggest upgrading to a server OS I need to have hard proof that this is what’s happening.

The 20 count is concurrent connections, not devices connecting. Many times things like scanners or Windows itself will connect more than once. When the 20 count is reached, the Desktop OS will stop responding.

Another tactic to use with your client – Desktop OS is not licensed to be used as a Server, so they are breaking their MS licensing. They may not really care, but maybe it’s one more nail in the coffin, so to speak.

Is a full Server really needed, though? If it’s just file sharing, maybe a NAS will do the job.