I have a program running on my local machine that prints data to port 50000. In a terminal on my local machine I run nc to connect to and print the data on the port. However, when using nc in terminal to establish the connection I get no response. I have used wireshark, netstat, nmap, and tcpdump trying to figure out why this connection can't be established. From what I can tell:

  • the terminal sends the SYN packet
  • the terminal retransmits the SYN packet continuously
  • the SYN/ACK packet is never sent
  • there are no dropped packets on any interface
  • iptables is told to accept all packets

I can't seem to figure out why the SYN/ACK packet is never sent back. Any ideas?

  • The problem is clearly on the remote side, so you should debug it on the remote side. Do the SYN packets arrive? Firewall?
    – peterh
    Commented Jan 14, 2019 at 20:06
  • Local to local? Local to remote? Where have you run wireshark (client or server, or both)? What are the relevant IP addresses? Please provide some details in your question so we've got identities to hang answers off. Commented Jan 14, 2019 at 20:09
  • Just to be clear, the program and nc are being run on the same machine. Nothing is going over the internet. I'm new to networking so I just wanted to make sure this is clear. As for the packet arrival, Wireshark has a listed arrival time. So as far as I can tell it arrived. Is there a program you suggest to check this?
    – Austin
    Commented Jan 14, 2019 at 20:11
  • Please put that clarification into your question, where it's easy for people to find. Commented Jan 14, 2019 at 22:55

1 Answer 1


I fixed it. It appears to have been a code issue. We set our listen() backlog size to 0, causing any attempted connection to fail. The packets were never lost, the socket just wasn't able to accept any attempted connection.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .