How to instantly reject attempt to connect to 0.0.0.0 on some port? - macos

I've almost clean installation of OSX Ventura on macbook air m2. I'm runinig some tests and during test initialization I noticed that it waits many times for 2 minutes.
After looking though the code I noticed it's checking whether specific ports are available. What's funny is that it's trying to connect to 0.0.0.0:10389.
netstat -an doesn't show anything listeing on port 10389, but there's still 30s timeout until connection attempt is rejected.
Same if I try telnet 0.0.0.0 10389 or any other port. There's some firewall or something that I can't find that's probably timeouting the connection. But what to search for? It's clean installation. FW is disabled in settings, I uninstalled eset cyber security...
Any ideas? I'm stuck on this for few days already...

Related

Local HTTP Server Only Access-able When Wifi is Turned Off

This was woorking for me a week ago and I have no idea what changed.
I have a local http server on one device that I'm accessing with my Mac (through javascript),they are directly connected through Ethernet/a switch. I have the ethernet network on my mac set to a manual ip/mask to reflect the address of my server.
I can interact with my server perfectly when wifi is turned off on my mac, however, when I turn it on everything breaks and my requests to the server time out with no response (wifi is still functional).
Things I've tried:
Changing the network priority in network system preferences on my mac to make sure the wired Ethernet connection takes priority over WiFi. This changed nothing
Added a static route sudo route add -host [ip of http server] -interface en10. After I changed this, the server was unreachable even when wifi was down so I may have done something wrong
rebooted :)
I'm super lost here - any advice or any debugging tips would be much appreciated!

Ping request timeout on macOS

I am running macOS Big Sur version 11.3.1 (20E241).
My internet connection works. I do not have my firewall active.
I still cannot ping any IP address. It fails with:
Request timeout for icmp_seq 0
What am I missing?
UPDATE
While trying to filter out the possible problems, I connected my laptop to a different network (mobile 4G) and the ping worked. So, the problem is not anything related to a configuration in my laptop but in my router.
The problem was not related to MacOs but with my router configuration.
I am using a tp-link C50 Archer.
The router has a security session where it offers to checkboxes:
Forbid Ping Packets From LAN Port
Forbid Ping Packets From WAN Port
Those were selected and that was the issue.
Unchecking those options the timeout was gone.

SSH connections from windows are aborted within a minute

If I start an SSH connection with my windows 10 laptop, it gets aborted within a minute. Even when I'm actively using the connection.
I tried multiple servers (Ubuntu 18, 16 and ESXi 6.7) all with the same problem, also tried to use different clients (putty and mobaXterm).
Did a packet capture and it does look like the connected server sends a RST with ACK to my laptop. After which my laptop responds FIN with ACK.
If I setup the same connection from my phone with JuiceSSH it keeps working normally. That's why I suspect my laptop, but I have no idea how to resolve it.
Any ideas?
In putty feel free to try with:
In your session properties, go to Connection and under Sending of null packets
to keep session active, set Seconds between keepalives (0 to turn off) to e.g.
300 (5 minutes).
source: https://patrickmn.com/aside/how-to-keep-alive-ssh-sessions/

packet_write_wait: Connection to xxx.xxx.xxx.xxx: Broken pipe

What does it mean when the terminal throw this error and how to solve it?
packet_write_wait: Connection to xxx.xxx.xxx.xxx: Broken pipe
It was just happen today. After it work normally for year.
My terminal keep disconnect at a certain time. I had already search on google but most of it is about "Write failed: Broken pipe."
Which I already solved that for years. I just found this new annoyed problems today
I experienced this problem as well and spent a few days trying to bisect it.
Like specified, playing with SSH KeepAlive parameters (ClientAliveInterval, ClientAliveCountMax, ServerAliveInterval and ServerAliveCountMax) or kernel TCP parameters (TCPKeepAlive on/off) does not solve the problem.
After playing with USB to Ethernet drivers and tcpdump, I realized the issue was due to the kernel 4.8 I was using. I switched the source (sending side) to 4.4 LTS and the problem disappeared (rsync via ssh and scp were working nicely again). The destination side can remain on 4.8 if you want, in my use case this was working (tested).
On the technical side, we can narrow a little bit the issue thanks to the wireshark dump below I made. We can see the TCP channel of the SSHv2 protocol is being reset (RST flag of TCP set to 1) causing the connection to abort. I don't know the cause of that RST yet. I need to make some bisection from 4.8.1 to 4.8.11 for that.
I'm not saying your problem is specifically due to the kernel 4.8, but wrt. the date you posted your question/message, there are high chances you are currently using a kernel more recent than 4.4.
If that is an ssh connection, then you might want to make sure you send a keepalive message to the server.
ServerAliveInterval seems to be the most common strategy to keep a connection alive. To prevent the broken pipe problem, here is the ssh config I useed in my .ssh/ssh_config file (may be named as /etc/ssh/config or sshd_config):
Host myhostshortcut
HostName myhost.com
User barthelemy
ServerAliveInterval 60
ServerAliveCountMax 10
Connect through another wifi.
I don't know why or how it works, but it does.
The original poster sthapaun already mentioned this solution in a comment, but I want to add that the solution works for me, too.

snmpd timeout: No response from localhost

I am running Centos 6.3 and attempting to use snmp v3 to query OID's on this server. Running Paessler's snmp tester 5.1.3 I get a no response from host. I have made sure that my iptables do not have any odd firewall settings. I can verify that snmpd is listening on port 161. I have also made sure that SELinux is fully disabled. I am able to install this on Centos 7.1 without any issue. I have done a tail on the messages in var/log/messages and can see incoming traffic for snmpd. I am stumped and have no idea why this will work on one version of this OS but not another. I wonder if anyone has any suggestions.
Thank you

Resources