我对我的客户端程序无法与远程 Web 服务器建立 TCP 连接的问题感到困惑。
[场景]
基于 ubuntu server 12.04 LTS 的客户端程序。
192.168.1.118(客户端程序)<--------TCP---------> sync.oncecode.com(网络服务器)
[现象]
客户端发送 SYN,Web 服务器回复 SYN/ACK,客户端立即发送 RST。我在 TCP/IP 标头中看不到任何异常。有人可以告诉我这里可能发生的事情吗?我已经没有想法了......
[ Tcpdump 日志]
21:31:31.622576 IP 192.168.1.118.51441 > sync.oncecode.com.http: Flags [S], seq 3468888759, win 5360, options [mss 536,sackOK,TS val 40855676 ecr 0,nop,wscale 7], length 0
0x0000: 4500 003c 537d 4000 4006 ee75 c0a8 0176 E..<S}@.@..u...v
0x0010: 2a79 0c32 c8f1 0050 cec3 0ab7 0000 0000 *y.2...P........
0x0020: a002 14f0 f8f7 0000 0204 0218 0402 080a ................
0x0030: 026f 687c 0000 0000 0103 0307 .oh|........
21:31:31.690808 IP sync.oncecode.com.http > 192.168.1.118.51441: Flags [S.], seq 1535159088, ack 3468888760, win 5792, options [mss 1440,sackOK,TS val 971694021 ecr 40830368,nop,wscale 6], length 0
0x0000: 4500 003c 0000 4000 3606 4bf3 2a79 0c32 E..<..@.6.K.*y.2
0x0010: c0a8 0176 0050 c8f1 5b80 ab30 cec3 0ab8 ...v.P..[..0....
0x0020: a012 16a0 6d6e 0000 0204 05a0 0402 080a ....mn..........
0x0030: 39ea dfc5 026f 05a0 0103 0306 9....o......
21:31:31.690826 IP 192.168.1.118.51441 > sync.oncecode.com.http: Flags [R], seq 3468888760, win 0, length 0
0x0000: 4500 0028 0000 4000 4006 4207 c0a8 0176 E..(..@.@.B....v
0x0010: 2a79 0c32 c8f1 0050 cec3 0ab8 0000 0000 *y.2...P........
0x0020: 5004 0000 145a 0000
[附加] 防火墙似乎已关闭,我检查了它
olele@ubuntu:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination