Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This is what happened:

client - send syn

server - send icmp (unreachable host [i also try to add code =10] ) wait for 100 ms send syn-ack

client - send ack in response to the syn-ack.

Dosnt the client should reset the tcp handshake ,when icmp of unreachable host was sent? Is there any way to cause the client to reset the connection by sending some kind of ICMP?

The test was done on 2 Ubunto machine connected directly. In wireshark i see that icmp was revived before syn-ack and the connection was not reset. The client run telnet (on port 80) to server. In server run apache. I simulate the icmp before the synack by using python scapy.

Thank you

share|improve this question
    
What are you trying to achieve? –  Chopper3 Aug 6 '12 at 18:56
    
I need to reset the tcp connection , i cannot send rst just icmp –  Avihai Marchiano Aug 6 '12 at 19:06

1 Answer 1

up vote 2 down vote accepted

Yes the client should stop attempting the connection... but:

  1. Many brain-dead ISPs block ICMP, or a subset of ICMP messages.
  2. Many NATs do not pass ICMP messages inward correctly.
  3. Many OSes block ICMP at their firewall.
  4. Many "security" suites block ICMP.
  5. Not all IP stacks respond to ICMP correctly.
  6. Not all applications/APIs respond to ICMP correctly.

With all that, the situation you described is not only more common than it should be but very common.

share|improve this answer
1  
I will add this data to the question.The test was done on 2 Ubunto machine connected directly. In wireshark i see that icmp was revived before syn-ack and the connection was not reset. –  Avihai Marchiano Aug 6 '12 at 19:16
    
What's the application? What network API is it using? –  Chris S Aug 6 '12 at 19:23
    
Add this data to the question. Thank you!!!! –  Avihai Marchiano Aug 6 '12 at 19:25
    
BSD's Telnet defers to the OSes implementation of sockets.. It works perfectly on my FreeBSD box, so I can only assume that it's something in Linux. –  Chris S Aug 6 '12 at 20:00
    
I also try IE running on windows as a client. let me be sure the scenario above that both icmp and syn-ack sent is working on your machine? –  Avihai Marchiano Aug 6 '12 at 20:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.