I have configured a nginx http webserver to serve a site on CentOS 6 Virtual machine. every things are works fine but when I connect to site from a special ISP, the site wait and after a while respond 504 Gateway timeout. This occurs only from this ISP not any else.
After several search I found that this problem may be related to MTU of my interface. I changed MTU to 1400 but still the problem exist. Can anyone help me?


You can see traffic capture in this image:


I have changed MTU in server to 1400 but server responses MSS=1460 that mean MTU is 1500. When I capture traffic and check the MSS on other ISPs, I get MSS=1360 and this is correct.

You can see server packets in this image:

enter image description here

  • 1
    Can you provide a traffic capture of the issue? You haven't really provided many details to go on here. – Mark Riddell Jun 12 '16 at 7:26
  • Thanks alot @MarkoPolo. I have provided additional details. – Ghasem Pahlavan Jun 12 '16 at 10:04
  • Thanks, can you run the capture from both ends - server and client - which should highlight if this is an MTU issue or not. – Mark Riddell Jun 12 '16 at 11:10
  • As you can see server responses packets with MTU=1360. – Ghasem Pahlavan Jun 12 '16 at 12:21
  • Remember that MSS is unidirectional and client and server are free to set whichever MSS they choose. Your server is using an MSS of 1360 because you changed your interface MTU to 1400. The client does not need to use the same MSS. The server packet capture is showing nothing but retransmissions. The server receives the SYN from the client, sends its SYN/ACK response but then the clients sends another SYN packet. This suggests that the SYN/ACK packets from your server are not actually being received by the client. – Mark Riddell Jun 12 '16 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.