我有一个目标服务器,当前我的网络掩码被错误地配置为 255.0.0.0。其正确的网络掩码是 255.255.255.128。我的源服务器也是 /25 网络,所以它们都有相同的子网掩码,但都属于两个不同的 vlan。
我的问题如下:
我可以通过属于不同 vlan 和 IP 范围(如 157)的另一台服务器成功连接到我的目标服务器。。. ,但是,我无法从 10.10.126 连接到我的目标服务器。. 在目标服务器中跟踪路由后,我发现服务器在本地检查源 IP 是否属于其自己的本地子网。如果它的网络掩码配置错误,为什么它允许来自 157.* 服务器的 ssh 连接?它是如何做到的?
当前错误配置:
Destination server: 10.10.127.* netmask 255.0.0.0
当前正确的配置:
Source server: 10.10.126.* Mask:255.255.255.128
测试tcpdump
:
[root@Destination_server ~]# tcpdump -vvv -i eno16780032 host 10.10.126.*
tcpdump: listening on eno16780032, link-type EN10MB (Ethernet), capture size 65535 bytes
21:36:28.403812 IP (tos 0x0, ttl 64, id 48314, offset 0, flags [DF], proto TCP (6), length 60)
10.10.126.*.60692 > Destination_server.ssh: Flags [S], cksum 0x3c87 (correct), seq 379301407, win 29200, options [mss 1380,sackOK,TS val 495338
91 ecr 0,nop,wscale 7], length 0
21:36:28.403928 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.126.* tell Destination_server, length 28
21:36:29.400303 IP (tos 0x0, ttl 64, id 48315, offset 0, flags [DF], proto TCP (6), length 60)
10.10.126.*.60692 > Destination_server.ssh: Flags [S], cksum 0x3b8d (correct), seq 379301407, win 29200, options [mss 1380,sackOK,TS val 495341
41 ecr 0,nop,wscale 7], length 0
21:36:29.406300 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.126.* tell Destination_server, length 28
21:36:30.408295 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.126.* tell Destination_server, length 28
21:36:31.405136 IP (tos 0x0, ttl 64, id 48316, offset 0, flags [DF], proto TCP (6), length 60)
10.10.126.*.60692 > Destination_server.ssh: Flags [S], cksum 0x3998 (correct), seq 379301407, win 29200, options [mss 1380,sackOK,TS val 495346 42 ecr 0,nop,wscale 7], length 0
21:36:35.412611 IP (tos 0x0, ttl 64, id 48317, offset 0, flags [DF], proto TCP (6), length 60)
10.10.126.*.60692 > Destination_server.ssh: Flags [S], cksum 0x35ae (correct), seq 379301407, win 29200, options [mss 1380,sackOK,TS val 495356 44 ecr 0,nop,wscale 7], length 0
21:36:35.412738 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.126.* tell Destination_server, length 28
21:36:36.414276 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.126.* tell Destination_server, length 28
21:36:37.416282 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.126.* tell Destination_server, length 28
21:36:43.428318 IP (tos 0x0, ttl 64, id 48318, offset 0, flags [DF], proto TCP (6), length 60)
10.10.126.*.60692 > Destination_server.ssh: Flags [S], cksum 0x2dda (correct), seq 379301407, win 29200, options [mss 1380,sackOK,TS val 495376 48 ecr 0,nop,wscale 7], length 0
21:36:43.428457 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.126.* tell Destination_server, length 28
21:36:44.430268 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.126.* tell Destination_server, length 28
21:36:45.432280 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.126.* tell Destination_server, length 28