我遇到以下问题:并非所有 PC 都可以访问运行 nginx 服务器(端口 8080)的 kcam7.local。首先,这是网络配置:
因此,从 192.168.0.x 中的所有主机访问在 kcam7.local(端口 80)上运行的 apache 服务器以及 192.168.3.x 中的其他 apache web 服务器(端口 80)是没有问题的。
但是,我无法从 192.168.0.x 中的某些主机(例如 deskt6.local)访问在 kcam7.local:8080 上运行的 nginx 服务器。
但是我可以从 192.168.0.68 访问 kcam7.local:8080。
如果我从desktop6.local到其他电脑进行端口转发,指向kcam7.local:8080,我就可以访问nginx网络服务器,下面是我尝试过的(全部正常):
ssh -L 8017:localhost:8080 kcam7.local
ssh -L 8027:kcam7.local:8080 192.168.3.1
ssh -L 8037:kcam7.local:8080 192.168.0.254
ssh -L 8047:kcam7.local:8080 192.168.0.8
如何调试的最佳策略是什么?
我对 192.168.0.254 的 8080 端口进行了 tcpdump,以下是主机 desker6.local 和 192.168.0.68 的输出
22:06:53.882768 IP desktop6.local.54611 > kcam7.local.http-alt: Flags [S], seq 2131051432, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:06:53.907009 IP kcam7.local.http-alt > desktop6.local.54611: Flags [S.], seq 2186937959, ack 2131051433, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:06:54.132887 IP desktop6.local.54612 > kcam7.local.http-alt: Flags [S], seq 1915924919, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:06:54.157999 IP kcam7.local.http-alt > desktop6.local.54612: Flags [S.], seq 2710368020, ack 1915924920, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:06:54.926499 IP kcam7.local.http-alt > desktop6.local.54611: Flags [S.], seq 2186937959, ack 2131051433, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:06:55.166053 IP kcam7.local.http-alt > desktop6.local.54601: Flags [S.], seq 422812458, ack 933802184, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:06:55.166871 IP kcam7.local.http-alt > desktop6.local.54612: Flags [S.], seq 2710368020, ack 1915924920, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:06:56.897993 IP desktop6.local.54611 > kcam7.local.http-alt: Flags [S], seq 2131051432, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:06:56.921168 IP kcam7.local.http-alt > desktop6.local.54611: Flags [S.], seq 2186937959, ack 2131051433, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:06:57.134301 IP desktop6.local.54612 > kcam7.local.http-alt: Flags [S], seq 1915924919, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:06:57.157818 IP kcam7.local.http-alt > desktop6.local.54612: Flags [S.], seq 2710368020, ack 1915924920, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:06:58.926144 IP kcam7.local.http-alt > desktop6.local.54611: Flags [S.], seq 2186937959, ack 2131051433, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:06:59.166164 IP kcam7.local.http-alt > desktop6.local.54612: Flags [S.], seq 2710368020, ack 1915924920, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:00.286735 IP kcam7.local.http-alt > desktop6.local.54604: Flags [S.], seq 1276118689, ack 3600055918, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:02.897739 IP desktop6.local.54611 > kcam7.local.http-alt: Flags [S], seq 2131051432, win 8192, options [mss 1460,nop,nop,sackOK], length 0
22:07:02.921039 IP kcam7.local.http-alt > desktop6.local.54611: Flags [S.], seq 2186937959, ack 2131051433, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:03.153861 IP desktop6.local.54612 > kcam7.local.http-alt: Flags [S], seq 1915924919, win 8192, options [mss 1460,nop,nop,sackOK], length 0
22:07:03.178319 IP kcam7.local.http-alt > desktop6.local.54612: Flags [S.], seq 2710368020, ack 1915924920, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:06.926480 IP kcam7.local.http-alt > desktop6.local.54611: Flags [S.], seq 2186937959, ack 2131051433, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:07.246156 IP kcam7.local.http-alt > desktop6.local.54612: Flags [S.], seq 2710368020, ack 1915924920, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:08.246931 IP desktop6.local.54616 > kcam7.local.http-alt: Flags [S], seq 768927590, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:07:08.247014 IP desktop6.local.54615 > kcam7.local.http-alt: Flags [S], seq 1260009903, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:07:08.271208 IP kcam7.local.http-alt > desktop6.local.54616: Flags [S.], seq 505893998, ack 768927591, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:08.272034 IP kcam7.local.http-alt > desktop6.local.54615: Flags [S.], seq 550380053, ack 1260009904, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:08.497383 IP desktop6.local.54617 > kcam7.local.http-alt: Flags [S], seq 705929728, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:07:08.520314 IP kcam7.local.http-alt > desktop6.local.54617: Flags [S.], seq 76388451, ack 705929729, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:09.326906 IP kcam7.local.http-alt > desktop6.local.54615: Flags [S.], seq 550380053, ack 1260009904, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:09.327060 IP kcam7.local.http-alt > desktop6.local.54616: Flags [S.], seq 505893998, ack 768927591, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:09.566950 IP kcam7.local.http-alt > desktop6.local.54617: Flags [S.], seq 76388451, ack 705929729, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:11.270181 IP desktop6.local.54615 > kcam7.local.http-alt: Flags [S], seq 1260009903, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:07:11.270219 IP desktop6.local.54616 > kcam7.local.http-alt: Flags [S], seq 768927590, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:07:11.296324 IP kcam7.local.http-alt > desktop6.local.54615: Flags [S.], seq 550380053, ack 1260009904, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:11.297084 IP kcam7.local.http-alt > desktop6.local.54616: Flags [S.], seq 505893998, ack 768927591, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:11.490863 IP desktop6.local.54617 > kcam7.local.http-alt: Flags [S], seq 705929728, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:07:11.514195 IP kcam7.local.http-alt > desktop6.local.54617: Flags [S.], seq 76388451, ack 705929729, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:13.326775 IP kcam7.local.http-alt > desktop6.local.54616: Flags [S.], seq 505893998, ack 768927591, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:13.327012 IP kcam7.local.http-alt > desktop6.local.54615: Flags [S.], seq 550380053, ack 1260009904, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:13.567555 IP kcam7.local.http-alt > desktop6.local.54617: Flags [S.], seq 76388451, ack 705929729, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:15.012465 IP kcam7.local.http-alt > desktop6.local.54611: Flags [S.], seq 2186937959, ack 2131051433, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:15.646457 IP kcam7.local.http-alt > desktop6.local.54612: Flags [S.], seq 2710368020, ack 1915924920, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:17.273403 IP desktop6.local.54615 > kcam7.local.http-alt: Flags [S], seq 1260009903, win 8192, options [mss 1460,nop,nop,sackOK], length 0
22:07:17.273438 IP desktop6.local.54616 > kcam7.local.http-alt: Flags [S], seq 768927590, win 8192, options [mss 1460,nop,nop,sackOK], length 0
22:07:17.297841 IP kcam7.local.http-alt > desktop6.local.54615: Flags [S.], seq 550380053, ack 1260009904, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:17.297989 IP kcam7.local.http-alt > desktop6.local.54616: Flags [S.], seq 505893998, ack 768927591, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:17.499093 IP desktop6.local.54617 > kcam7.local.http-alt: Flags [S], seq 705929728, win 8192, options [mss 1460,nop,nop,sackOK], length 0
22:07:17.522513 IP kcam7.local.http-alt > desktop6.local.54617: Flags [S.], seq 76388451, ack 705929729, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:21.326278 IP kcam7.local.http-alt > desktop6.local.54616: Flags [S.], seq 505893998, ack 768927591, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:21.327287 IP kcam7.local.http-alt > desktop6.local.54615: Flags [S.], seq 550380053, ack 1260009904, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:21.566151 IP kcam7.local.http-alt > desktop6.local.54617: Flags [S.], seq 76388451, ack 705929729, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:47.211854 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [S], seq 1127876887, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:07:47.234951 IP kcam7.local.http-alt > 192.168.0.68.46362: Flags [S.], seq 4241460525, ack 1127876888, win 29200, options [mss 1250,nop,nop,sackOK,nop,wscale 6], length 0
22:07:47.235642 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [R], seq 1127876888, win 0, length 0
22:07:47.462118 IP 192.168.0.68.46364 > kcam7.local.http-alt: Flags [S], seq 3417073363, win 64240, options [mss 1460,sackOK,TS val 2761483309 ecr 0,nop,wscale 7], length 0
22:07:47.485455 IP kcam7.local.http-alt > 192.168.0.68.46364: Flags [S.], seq 2758912258, ack 3417073364, win 28960, options [mss 1250,sackOK,TS val 4024372560 ecr 2761483309,nop,wscale 6], length 0
22:07:47.486835 IP 192.168.0.68.46364 > kcam7.local.http-alt: Flags [.], ack 1, win 502, options [nop,nop,TS val 2761483334 ecr 4024372560], length 0
22:07:47.487116 IP 192.168.0.68.46364 > kcam7.local.http-alt: Flags [P.], seq 1:331, ack 1, win 502, options [nop,nop,TS val 2761483334 ecr 4024372560], length 330: HTTP: GET /hello HTTP/1.1
22:07:47.509837 IP kcam7.local.http-alt > 192.168.0.68.46364: Flags [.], ack 331, win 470, options [nop,nop,TS val 4024372584 ecr 2761483334], length 0
22:07:47.546247 IP kcam7.local.http-alt > 192.168.0.68.46364: Flags [P.], seq 1:18, ack 331, win 470, options [nop,nop,TS val 4024372617 ecr 2761483334], length 17: HTTP: HTTP/1.0 200 OK
22:07:47.546640 IP 192.168.0.68.46364 > kcam7.local.http-alt: Flags [.], ack 18, win 502, options [nop,nop,TS val 2761483394 ecr 4024372617], length 0
22:07:47.547157 IP kcam7.local.http-alt > 192.168.0.68.46364: Flags [FP.], seq 18:174, ack 331, win 470, options [nop,nop,TS val 4024372621 ecr 2761483334], length 156: HTTP
22:07:47.547716 IP 192.168.0.68.46364 > kcam7.local.http-alt: Flags [F.], seq 331, ack 175, win 501, options [nop,nop,TS val 2761483395 ecr 4024372621], length 0
22:07:47.568018 IP kcam7.local.http-alt > 192.168.0.68.46364: Flags [.], ack 332, win 470, options [nop,nop,TS val 4024372643 ecr 2761483395], length 0
22:07:48.241890 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [S], seq 1305276099, win 64240, options [mss 1460,sackOK,TS val 2761484089 ecr 0,nop,wscale 7], length 0
22:07:48.264771 IP kcam7.local.http-alt > 192.168.0.68.46362: Flags [S.], seq 4257556694, ack 1305276100, win 28960, options [mss 1250,sackOK,TS val 4024373339 ecr 2761484089,nop,wscale 6], length 0
22:07:48.265306 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [.], ack 1, win 502, options [nop,nop,TS val 2761484113 ecr 4024373339], length 0
22:07:50.229696 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [S], seq 1127876887, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:07:50.256391 IP kcam7.local.http-alt > 192.168.0.68.46362: Flags [.], ack 1, win 453, options [nop,nop,TS val 4024375331 ecr 2761484113], length 0
22:07:53.266284 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [F.], seq 1, ack 1, win 502, options [nop,nop,TS val 2761489113 ecr 4024375331], length 0
22:07:53.291491 IP kcam7.local.http-alt > 192.168.0.68.46362: Flags [F.], seq 1, ack 2, win 453, options [nop,nop,TS val 4024378364 ecr 2761489113], length 0
22:07:53.291949 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [.], ack 2, win 502, options [nop,nop,TS val 2761489139 ecr 4024378364], length 0
22:07:56.225927 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [S], seq 1127876887, win 8192, options [mss 1460,nop,nop,sackOK], length 0
22:07:56.249705 IP kcam7.local.http-alt > 192.168.0.68.46362: Flags [S.], seq 87345848, ack 1127876888, win 29200, options [mss 1250,nop,nop,sackOK], length 0
22:07:56.250163 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [.], ack 4170210848, win 502, options [nop,nop,TS val 2761492097 ecr 4024378364], length 0
22:07:57.326210 IP kcam7.local.http-alt > 192.168.0.68.46362: Flags [S.], seq 87345848, ack 1127876888, win 29200, options [mss 1250,nop,nop,sackOK], length 0
22:07:57.326759 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [.], ack 4170210848, win 502, options [nop,nop,TS val 2761493174 ecr 4024378364], length 0
22:07:59.406597 IP kcam7.local.http-alt > 192.168.0.68.46362: Flags [S.], seq 87345848, ack 1127876888, win 29200, options [mss 1250,nop,nop,sackOK], length 0
22:07:59.407340 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [.], ack 4170210848, win 502, options [nop,nop,TS val 2761495254 ecr 4024378364], length 0
22:08:03.486686 IP kcam7.local.http-alt > 192.168.0.68.46362: Flags [S.], seq 87345848, ack 1127876888, win 29200, options [mss 1250,nop,nop,sackOK], length 0
22:08:03.487267 IP 192.168.0.68.46362 > kcam7.local.http-alt: Flags [.], ack 4170210848, win 502, options [nop,nop,TS val 2761499334 ecr 4024378364], length 0