Hot answers tagged

131 votes

Is there any harm of leaving Ethernet outlet unplugged?

First: you are safe. I'm assuming you have the standard plug that looks like this: but if it is a wire that plugs into a laptop or desktop computer, the chances are good that it is a standard RJ45 ...
85 votes
Accepted

Why was port 80 chosen as the default HTTP port and 443 as the default HTTPS port?

The Internet Assigned Numbers Authority (IANA) is a department of ICANN, a nonprofit private American corporation that oversees global IP address allocation, Domain Name System (DNS), well-known ports ...
  • 16.9k
67 votes

Do web browsers use different outgoing ports for different tabs?

Each connection to a website uses a different socket with default destination TCP port 80 for plain HTTP and 443 for HTTPS. For the socket to be unique, the combination of the source IP address, ...
63 votes
Accepted

Do web browsers use different outgoing ports for different tabs?

Do browsers use different ports to connect to different websites? Yes, they do. Here is an example, showing my current Firefox connections (I have 9 open tabs) on Windows 7: Notes: You can see ...
  • 149k
56 votes

Is there any harm of leaving Ethernet outlet unplugged?

The question I'd be asking is whether your ethernet is safe from your kitchen? You wouldn't want to splash liquid into the port and cause corrosion of the socket, as then devices plugged in there in ...
  • 4,959
56 votes

What port does 'ping' work on?

Ping uses the ICMP protocol which doesn't have ports like the TCP and UDP protocols. If you need to see if Ping is disabled on a Linux system, you can check: cat /proc/sys/net/ipv4/...
  • 728
44 votes
Accepted

How are source ports determined and how can I force it to use a specific port

How are local ports determined The port number is chosen by the TCP implementation software from a range of port numbers called Ephemeral Ports. The exact mechanism for choosing the port number and ...
  • 149k
38 votes

What port does 'ping' work on?

TCP/IP uses a four-layer network stack. The Link layer deals with the physical media and how to get bytes across, the Internet layer deals with IP addresses and how to route data from one node to ...
  • 2,963
36 votes
Accepted

What is the difference and relationship between a process id and a port number?

To answer the question directly: there is no connection between the process ID and the port number. They enumerate entirely different things. The PID identifies a process (eg a Firefox session: each ...
34 votes
Accepted

How to detect if a network is blocking outgoing ports?

tl;dr Run this command to test a specific port (fast). time nmap -p 22 portquiz.net Run this command to test popular ports (slow). time nmap portquiz.net Run this command to test all ports (...
31 votes

SSH: Troubleshooting "Remote port forwarding failed for listen port" errors

Why does ssh -N -R 2222:localhost:22 <bluehost_user>@<bluehost_ip> result in a "Remote port forwarding failed for listen port" error? I get this exact warning when I attempt to use a port ...
30 votes

Why are USB ports sometimes referred to as serial ports and called COM?

These aren't USB ports referred to as serial ports. In your example, the Arduino has a USB-to-serial device (either in the form of a second microcontroller, or an FTDI chip). This will use USB to ...
29 votes

Are there good alternative HTTP ports rather than port 80?

There are actually 3 HTTP alternative ports: 591, 8008 and 8080. They are assigned by IANA as "HTTP Alternate", which makes them pretty much as official as it gets. If you run Linux as a non-...
  • 1,365
21 votes

How to kill a process by port on MacOS, a la fuser -k 9000/tcp

Adding the -t and -i flags to lsof should speed it up even more by removing the need for grep and awk. lsof -nti:NumberOfPort | xargs kill -9 lsof arguments: -n Avoids host names lookup (may result ...
20 votes
Accepted

Does it matter what UDP port a WOL signal is sent to?

@Spiff is correct that it doesn't matter as far as the Wake-on-LAN functionality of the intended recipient goes. However, UDP is recommended because it can be generated without raw sockets which come ...
20 votes
Accepted

What ports are used by an application

You can use netstat for this. See the example (I grepped for ssh): netstat -putan | grep ssh tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1725/sshd tcp 0 ...
  • 4,114
20 votes

Why are USB ports sometimes referred to as serial ports and called COM?

It's confusing because Windows COM: ports come from a naming system defined back in MS-DOS (b. 1980). This was pretty-much copied from CP/M (b. 1974) with some ideas taken from Unix. They didn't ...
  • 333
18 votes

Why was port 80 chosen as the default HTTP port and 443 as the default HTTPS port?

The answer by jcbermu mentions that RFC 1340 (assigned numbers) had a run of unused ports from 374 to 512, and 443 is right in the middle. assert https_port == (374 + 512) / 2 == 443
  • 181
16 votes

how to disable feature that opened port 445 on windows server?

I would like to extend this answer Port 445 in Windows is by default used by "Server" service (real name is "lanmanserver") to provide file sharing via SMB protocol. To prevent Windows from listening ...
16 votes
Accepted

Linux command get unused port

netstat -lat gives the complete list of listening and established ports. When a port is not on any of those states doesn't exist for the system, so you won't find a command that shows the list of ...
  • 16.9k
15 votes

Test if a port on a remote system is reachable (without telnet)

[admin@automation-server 1.2.2]# nc -v -z -w2 192.168.193.173 6443 nc: connect to 192.168.193.173 port 6443 (tcp) failed: Connection refused [admin@automation-server 1.2.2]# nc -v -z -w2 192.168.194....
15 votes

Test if a port on a remote system is reachable (without telnet)

Here is one-liner: </dev/tcp/localhost/11211 && echo Port is open || echo Port is closed using Bash syntax explained in @lornix answer. For more info, check: Advanced Bash-Scripting ...
  • 23.6k
14 votes

Outgoing VPN PPTP: How to check if TCP port 1723 and GRE protocol port 47 are blocked or not in Windows 7?

From command line, to check Windows Firewall rules for 1723 port: netsh advfirewall firewall show rule name=all | find "1723" If you have no results, there are no references to any 1723 port (...
14 votes
Accepted

Multiple processes listening on the same port; how is it possible?

It is possible. The goal is to process multiple incoming connections in parallel. Multiple haproxy instances may utilize separate CPU cores and work (semi-)independently. Incoming connection will be ...
13 votes

Understanding unique ip and port

A TCP connection is uniquely identified by (Local Host, Local Port, Remote Host, Remote Port). (Technically the protocol is also part of the criteria, but if we restrict ourselves to TCP, it’s of ...
  • 57k
12 votes

Is there a simple way to detect ISP port blocking?

This will take a lot of time but will get you the list of all blocked ports: #!/bin/bash COUNTER=1 while [ $COUNTER -lt 65535 ]; do echo $COUNTER curl portquiz.net:$COUNTER --...
  • 223
12 votes

Test if a port on a remote system is reachable (without telnet)

Combining the answers from @kenorb and @Azukikuru you could test port open/closed/firewalled. timeout 1 bash -c '</dev/tcp/127.0.0.1/22 && echo Port is open || echo Port is closed' || echo ...
12 votes
Accepted

Why does USB 3.1 only use two of the four available data lines?

USB 3.1 Gen 2 (SuperSpeed+, 10 Gbps) was designed to work over both existing USB 3.0 cables (the ones with the 5 extra contacts), as well as USB Type C cables. Since existing USB 3.0 cables (the ...
  • 99.2k
12 votes

What is the difference and relationship between a process id and a port number?

The PID is shown only so that you can identify the specific process doing the communication and is unrelated to the port number. If you had multiple copies of one program running and they were all ...
  • 86.7k
11 votes

Manually closing a port from commandline

You can close a listening socket using ss: sudo ss --kill state listening src :1234 Where 1234 is your port number. ss is part of the iproute2 package, so there is a strong change it is already ...
  • 1,703

Only top scored, non community-wiki answers of a minimum length are eligible