72 votes

Optimal value for Nginx worker_connections

Let's take the pragmatic approach. All these limits are things that were hardcoded and designed in the past century when hardware was slow and expensive. We're in 2016 now, an average wall-mart ...
user5994461's user avatar
  • 2,989
36 votes
Accepted

What causes SSH error: kex_exchange_identification: Connection closed by remote host?

Weirdly, none actually try to authenticate to open a session. Some spiders and services like Shodan scans public ipv4 addresses for open services, e.g. salt masters, ftp servers, RDPs, and also SSH ...
mforsetti's user avatar
  • 2,746
28 votes

Optimal value for Nginx worker_connections

ulimit -a will tell you how many open files your system allows a process to use. Also, net.ipv4.ip_local_port_range sets the total range of sockets to enable per IP. So, your worker_connections ...
Marcel's user avatar
  • 1,780
14 votes
Accepted

What does ConnectTimeout in ssh_config mean?

man ssh_config /ConnectTimeout ConnectTimeout Specifies the timeout (in seconds) used when connecting to the SSH server, instead of using the default system TCP timeout. This timeout is applied both ...
user9517's user avatar
  • 116k
12 votes

Siege: descriptor table full sock.c:119: Too many open files

To solve this problem for myself, I had to adjust the OS "ulimit" setting: ulimit -a -- Check current setting ulimit -n 10000 -- Edit setting value Source: https://bugs.debian.org/cgi-bin/bugreport....
bradforbes's user avatar
11 votes

RDP fakeout when connectiong: does nothing, no error

IT has been my experience that when you can authenticate but it does not launch the desktop, the remote server is installing updates or is in the middle of building the desktop environment. give it a ...
biggin747's user avatar
  • 111
11 votes

What causes SSH error: kex_exchange_identification: Connection closed by remote host?

I've just had this exact issue, and the cause was that I had a port translation happening internally to the load balancer, meaning that my ssh connections were reaching the host on port 80 instead of ...
Dave Rix's user avatar
  • 325
9 votes

How to intentionally cause ssh root connection refused

You can't do that. Your server has no way of knowing what user the remote connection will try to login as, until after it has already connected! You should consider using fail2ban to block repeated ...
Michael Hampton's user avatar
8 votes

wget ftp connection failing after PASV command

Another way is to avoid the passive mode, add --no-passive argument in your wget command can do it. wget -r --no-passive --no-parent ftp://account:<password>@<ip address>/folder/ -P /root
ytll21's user avatar
  • 181
8 votes
Accepted

After using killall -u root, I am unable to access server and all websites are down

From the killall(1) man page killall sends a signal to all processes running any of the specified commands. If no signal name is specified, SIGTERM is sent. ... -u, --user Kill only ...
user9517's user avatar
  • 116k
8 votes
Accepted

Opening 1 million connections maxes out at 469K

Not necessarily an answer but too big to put in a comment. tcp_mem (since Linux 2.4) This is a vector of 3 integers: [low, pressure, high]. These bounds, measured in units of the system page ...
Matthew Ife's user avatar
  • 23.5k
5 votes

better alternative for tcp_syncookies in linux

Ubuntu 10.04 has default "sysctl.d/10-network-security.conf" setting below: # Turn on SYN-flood protections. Starting with 2.6.26, there is no loss # of TCP functionality/features under normal ...
petertc's user avatar
  • 2,660
5 votes

What happens if a machine gets a SYN/ACK packet without sending initial SYN packet?

If a session does not exist for the source/destination pair, the packet will not be accepted by B. In the case of a SYN-ACK packet, B will reply with a RST (reset) packet, telling the server that no ...
Anamika Modi's user avatar
5 votes
Accepted

Running nginx on AWS is sending back 'ERR_CONNECTION_TIMED_OUT' responses

Configure a security group for the instance which allows inbound tcp 8080. Also ensure a local firewall (iptables, ufw, firewalld or similar) on the instance isn't blocking the traffic.
Jukka's user avatar
  • 736
4 votes

ssh tunnel refusing connections with "channel 2: open failed"

For me adding leading ":" works so command in your case would look like this: ssh -L :7000:localhost:7000 user@host -N -v
valentt's user avatar
  • 295
4 votes

Why are connections in FIN_WAIT2 state not closed by the Linux kernel?

If the socket is shutdown(), but not close() yet, the socket will stay in FIN_WAIT2 state. And since the application still owns the file descriptor, the kernel wouldn't bother to clean up.
L. Yan's user avatar
  • 41
4 votes

better alternative for tcp_syncookies in linux

Apparently, tcp_syncookies introduces more benefits than disadvantages. Instead of the typical speculation on random blogs, perhaps we could consult "the source": With the updates for IPv6 and ...
jmng's user avatar
  • 140
4 votes

Errors about Making Failover-Cluster on Hyper-V with Win-Server-19 on Powershell

What is the purpose of nesting Hyper-V clusters inside each other? Nested virtualization may be extremely tricky, especially in the networking part. Also, Hyper-V is not the best option for that kind ...
Net Runner's user avatar
  • 6,199
3 votes
Accepted

iis app pool set credentials not working for specific network account

I was tuning into this same issue and checked everything on the list with nothing helping. My fix was to go to computer management, select local users and groups and click properties for the user ...
Luckbox72's user avatar
3 votes

Understanding this error: apr_socket_recv: Connection reset by peer (104)

Besides the answers here, I have read a lot of other ones: Replace localhost by 127.0.0.1 Update the apache version (I have ApacheBench, Version 2.3 <$Revision: 1807734 $>) Add -r (Then I get ...
Martin Thoma's user avatar
3 votes

Finding short-lived TCP connections owner process

Actually a lot have changed since this question was asked. Most modern linux systems have advanced tracing capabilities which could be used for that purpose. For example: bcc (some distros call it ...
Slava Bacherikov's user avatar
3 votes

Able to connect by SSH, but not x2go

Encountered the same problem from Windows could not connect to remote linux client with SSH Key. Even Auto Login with Pageant running from PuTTY directly or running the included X2GO Pageant would ...
user373310's user avatar
3 votes

ssh tunnel refusing connections with "channel 2: open failed"

Alternative interpretation is, in my case, your typing it wrong. user@host ~ $ ssh -vvvNL 4444:127.0.0.0.1:4444 ... channel 2: open failed: connect failed: Name or service not known What happens ...
Hincor's user avatar
  • 31
3 votes

IPv6 DNS Connectivity through IPv6

The short answer is no, IPv4 client cannot connect to IPv6 server directly. However, you have options - you can setup dual-stack proxy in front of your server. This could be your own device (i.e. VPC ...
dtoubelis's user avatar
  • 4,747
3 votes
Accepted

Way to kill http nio connections in Tomcat

Since 4.5 the Linux kernel supports the SOCK_DESTROY operation, allowing one to destroy sockets (including those connected to TCP/IP connections) e.g., with ss(8). For example here is an ssh session: ...
Mark Wagner's user avatar
  • 18.1k
3 votes

I have a Juniper SRX100 and a WIN 10 PC connected, but they can't seem to ping each other, although they are on the same subnet

You can't ping a Windows computer out of the box. That's half the problem. Do you know if the Juniper is configured to allow inbound pings to itself? If not then that's the other half of the problem. ...
joeqwerty's user avatar
  • 111k
3 votes

Linux firewall packet handling

It highly depends on your configuration. Iptables doesn't do anything by default. In my experience, I've seen the following two practices as most common: The allow rule accepts all incoming packets ...
Florin Asăvoaie's user avatar
3 votes

What does ConnectTimeout in ssh_config mean?

How I remember, Connection timeout is a time when server writing for connection if host unreachable. If you fill it by 0 and client will has connection problems server will close connection immidietly ...
Dmitriy Morgul's user avatar
3 votes

Verify network providers

If you know any of their IPs, you can look up their AS (autonomous system) number and then use BGP looking glass at tier 1 providers to look up if your ISP is indeed directly peering with them. ...
AlexD's user avatar
  • 9,938
3 votes

After Windows 10 update 1803, network fails randomly

You can't create a server with client versions of Windows and hope it works properly… However, in Windows 10, since 1709, the SMB1 client is not installed by default and it's probably the source of ...
Swisstone's user avatar
  • 6,870

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