서버 2에서:

서버 2에서:

내 집 컴퓨터에 복사한 다음 두 번째 서버에 복사하는 방법으로는 파일 수가 너무 많아 한 서버에서 다른 서버로 파일을 복사하려고 합니다.

SSH, rync 및 scp는 모두 두 서버 중 하나에서 중단되지만 웹 터미널에서 SSH를 통해 직접 로그인하거나 Putty에서 SSH를 통해 로그인하는 것은 괜찮습니다.

  • Server1의 IP를 Server2의 CSF에 화이트리스트에 추가했습니다.
  • Server2의 IP를 Server1의 CSF에 화이트리스트에 추가했습니다.
  • 방화벽에 의해 차단되고 있는지 확인하기 위해 두 서버 모두에서 CSF를 완전히 꺼 두었습니다.

내 시스템에 대한 자세한 내용:

서버 1:

개인 서버
CentOS 7 [최신]
CloudLinux OS+ [최신](ImmunifyAV가 설치되어 있지 않습니다)
ConfigServer 보안 및 방화벽(서버 2의 IP는 화이트리스트에 등록되어 있습니다)
ConfigServer 발신 스팸 모니터
ConfigServer eXploit 스캐너
ConfigServer Mailscanner FE
Engintron

서버 2:

개인 서버
CentOS 7 [최신]
CloudLinux 운영 체제 [최신](ImmunifyAV가 설치되어 있지 않습니다)
ConfigServer 보안 및 방화벽(서버 1의 IP는 화이트리스트에 등록되어 있습니다)
인젠트론

sshd_config에 다음을 추가했습니다.

PermitRootLogin yes
AllowUsers root otheruser 

다음 명령을 사용하여 두 서버의 포트를 확인했습니다.

# netstat -plant | grep :22
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      101059/sshd
tcp        0      0 <server.2.ip>:22         <myhomeip.via.web.terminal>:61177     ESTABLISHED 102710/sshd: root@p
tcp6       0      0 :::22                   :::*                    LISTEN      101059/sshd

출력 예:

각 명령은 다음 4줄의 코드( 로 시작 OpenSSH_7.4p1)를 출력하고 중단됩니다(아무 일도 일어나지 않고 종료되지 않으며 오류도 없습니다).

서버 2에서:

# ssh -A -t -v [email protected] -p 22     
         
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to server2.mydomain.com [<server2.ip>] port 22

걸다

ssh -A -t -v [email protected] -p 22 scp /testnew /testfolder

걸다

ssh -A -t -v [email protected] -p 22 /testnew /testfolder

걸다

ssh -A -t -v [email protected] -p 22 scp /testfolder [email protected] -p 22 /testnew

걸다

rsync -a -e "ssh -p 22" [email protected]:/testfolder /testnew

걸다

서버 1에서:

ssh -A -t -v server2.mydomain.com -p 22 scp /testnew /testfolder

걸다

ssh -A -t -v server2.mydomain.com -p 22 /testnew /testfolder

걸다

ssh -A -t -v server2.mydomain.com -p 22 scp /testfolder [email protected] -p 22 /testnew

걸다

rsync -r -v --progress -e "ssh -p 22" [email protected]:/testfolder /testnew

걸다

또한 개인 키를 사용하여 한 서버에서 키를 생성하고 다른 서버에 업로드한 다음 다른 서버에 SSH를 시도했지만 다시 멈췄습니다!

ssh -i ~/.ssh/id_dsa [email protected] -p 22

아무것도 없어! 전혀 결과가 없습니다. 그냥 기다리세요.

내가 뭘 잘못했나요? ?

내 PC에 cygwin을 설치했고 두 서버 모두에 잘 SSH로 연결할 수 있습니다. 한 서버에서 다른 서버로 연결할 수 없습니다. 웹 터미널을 사용해 보았는데, 퍼티를 사용해 보았는데, 모든 것이 멈췄습니다. 아무것도 없었습니다. 집 연결을 재설정하려고 시도했고 모든 것을 시도했습니다. 아무것도 없습니다. 나는 헤매고 있으며 무엇을 더 시도해야할지 모르겠습니다.

내가 뭘 잘못했나요? 내 집 컴퓨터의 cygwin에서 일반 액세스가 가능하고 SSH를 사용하여 putty를 통해 두 서버에 직접 액세스할 수 있지만 한 서버에서 다른 서버로 연결할 수 없는 이유는 무엇입니까?

=================

고쳐 쓰다:

네트워크 통계 -r

이것은 server1의 출력입니다.netstat -r

Destination           Gateway         Genmask         Flags   MSS Window  irtt Iface
default               gateway         0.0.0.0         UG        0 0          0 eno3
<network>/27          0.0.0.0         255.255.255.240 U         0 0          0 eno3
server1.myserver.com  0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns2>         0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns3>         0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns4>         0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns5>         0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns6>         0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns7>         0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns8>         0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns9>         0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns10>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns11>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns12>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns13>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns14>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns15>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns16>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns17>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns18>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns19>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns20>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns21>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns22>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns23>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns24>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns25>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns26>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns27>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns28>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns29>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
<reversedns30>        0.0.0.0         255.255.255.255 UH        0 0          0 eno3
link-local            0.0.0.0         255.255.0.0     U         0 0          0 eno3

<network>/27네트워크의 서브넷입니다.

<reversednsX>은 역방향 DNS에 사용되는 도메인입니다(예: mydomain5.com).

server1.myserver.com이 출력과 다음 출력( server2.myserve이 터미널의 첫 번째 부분으로 나타남)에서 이는 도메인을 해당 IP에 연결하도록 역방향 DNS가 설정되지 않은 경우에 표시되는 내용입니다. 네트워크에 영향을 미치지 않습니다.

두 네트워크 모두 잘 작동합니다. 둘 다 SSH를 통해 액세스할 수 있습니다. 그들은 단지 서로에게 다가갈 수 없으며 그것이 문제입니다.

서버 2 출력netstat -r

Destination         Gateway         Genmask         Flags   MSS Window  irtt Iface
default             gateway         0.0.0.0         UG        0 0          0 eno1
</28.subnet.ip>.0   0.0.0.0         255.255.240.0   U         0 0          0 eno1
<broadcast>         0.0.0.0         255.255.255.240 U         0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
server2.myserve     0.0.0.0         255.255.255.255 UH        0 0          0 eno1
link-local          0.0.0.0         255.255.0.0     U         0 0          0 eno1

노트:

255.255.255.240내 서버 IP의 넷마스크가 정확합니다. 내 웹사이트가 온라인 상태입니다.

<broadcast>= 브로드캐스트 IP, 이 경우 내 서버 IP는 아래 2개입니다.

보안상의 이유로 위에 실제 서버 출력을 포함하지 않았습니다.

======================

IP 라우팅

서버 1 출력ip route

default via <nn>.1 dev eno3
<nn>.0/27 dev eno3 proto kernel scope link src <nn>.2
<nn>.3 dev eno3 scope link src <nn>.3
<nn>.4 dev eno3 scope link src <nn>.4
<nn>.5 dev eno3 scope link src <nn>.5
<nn>.6 dev eno3 scope link src <nn>.6
<nn>.7 dev eno3 scope link src <nn>.7
<nn>.8 dev eno3 scope link src <nn>.8
<nn>.9 dev eno3 scope link src <nn>.9
<nn>.10 dev eno3 scope link src <nn>.10
<nn>.11 dev eno3 scope link src <nn>.11
<nn>.12 dev eno3 scope link src <nn>.12
<nn>.13 dev eno3 scope link src <nn>.13
<nn>.14 dev eno3 scope link src <nn>.14
<nn>.15 dev eno3 scope link src <nn>.15
<nn>.16 dev eno3 scope link src <nn>.16
<nn>.17 dev eno3 scope link src <nn>.17
<nn>.18 dev eno3 scope link src <nn>.18
<nn>.19 dev eno3 scope link src <nn>.19
<nn>.20 dev eno3 scope link src <nn>.20
<nn>.21 dev eno3 scope link src <nn>.21
<nn>.22 dev eno3 scope link src <nn>.22
<nn>.23 dev eno3 scope link src <nn>.23
<nn>.24 dev eno3 scope link src <nn>.24
<nn>.25 dev eno3 scope link src <nn>.25
<nn>.26 dev eno3 scope link src <nn>.26
<nn>.27 dev eno3 scope link src <nn>.27
<nn>.28 dev eno3 scope link src <nn>.28
<nn>.29 dev eno3 scope link src <nn>.29
<nn>.30 dev eno3 scope link src <nn>.30
<xxx>.<xxx>.0.0/16 dev eno3 scope link metric 1003

<nn>.2는 서버 자체의 IP입니다. <nn>보안상의 이유로 제거된 네트워크 IP의 처음 3개 부분에 대한 약어입니다.

이 서브넷에 대한 참조:
<nn>.1-30 = 사용 가능한 IP
<nn>.0 = 네트워크
<nn>.31 = 브로드캐스트
255.255.255.224 = 넷마스크

서버 2 출력ip route

default via <xx>.<xx>.<xxx>.49 dev eno1
<xx>.<xx>.<yyy>.0/20 dev eno1 proto kernel scope link src <xx>.<xx>.<xxx>.51
<xx>.<xx>.<xxx>.48/28 dev eno1 proto kernel scope link src <xx>.<xx>.<xxx>.50
<xx>.<xx>.<xxx>.51 dev eno1 scope link src <xx>.<xx>.<xxx>.51
<xx>.<xx>.<xxx>.52 dev eno1 scope link src <xx>.<xx>.<xxx>.52
<xx>.<xx>.<xxx>.53 dev eno1 scope link src <xx>.<xx>.<xxx>.53
<xx>.<xx>.<xxx>.54 dev eno1 scope link src <xx>.<xx>.<xxx>.54
<xx>.<xx>.<xxx>.55 dev eno1 scope link src <xx>.<xx>.<xxx>.55
<xx>.<xx>.<xxx>.56 dev eno1 scope link src <xx>.<xx>.<xxx>.56
<xx>.<xx>.<xxx>.57 dev eno1 scope link src <xx>.<xx>.<xxx>.57
<xx>.<xx>.<xxx>.58 dev eno1 scope link src <xx>.<xx>.<xxx>.58
<xx>.<xx>.<xxx>.59 dev eno1 scope link src <xx>.<xx>.<xxx>.59
<xx>.<xx>.<xxx>.60 dev eno1 scope link src <xx>.<xx>.<xxx>.60
<xx>.<xx>.<xxx>.61 dev eno1 scope link src <xx>.<xx>.<xxx>.61
<xx>.<xx>.<xxx>.62 dev eno1 scope link src <xx>.<xx>.<xxx>.62
<zzz>.<zzz>.0.0/16 dev eno1 scope link metric 1002

참고: <xx>안전을 위해 숫자 부분을 삭제한 것 외에는 동일한 IP입니다. yy 또는 zz가 되면 서로 다른 숫자가 됩니다.

=======================

SFTP

서버 1에서:

# sftp -oPort=22 root@<server2.ip>

그냥 멈추었지만 결국 시간 초과되었습니다.

ssh: connect to host <server2.ip> port 22: Connection timed out
Couldn't read packet: Connection reset by peer

서버 2에서:

# sftp -oPort=22 root@<server1.ip>

ssh: connect to host <server1.ip> port 22: No route to host
Couldn't read packet: Connection reset by peer

연결을 끊고 잠시 후 위의 오류가 발생하고 끊어졌습니다.

======================

처음에는 Traceroute에서 양방향이 실패했습니다.

/etc/ips서버에서 IP를 확인해 봤습니다 .

서브넷 마스크가 255.255.240.0으로 표시되어 올바르지 않은 것 같습니다. 그런 다음 서브넷 마스크 계산기를 찾아보고 드롭다운 목록에서 서브넷 마스크 255.255.240.0이 /20 서브넷에 속한다는 것을 확인했습니다.

그런 다음 위의 출력에서 ​​/20을 본 기억이 납니다. 255.255.240.0은 /20 서브넷에 대한 것이며 올바른 서브넷(/28 서브넷이어야 함, 즉 넷마스크 255.255.255.240)이 아닙니다. 따라서 넷마스크가 잘못되었습니다.

서브넷 마스크를 업데이트하고 server2에서 /etc/ips올바른 세부 정보로 브로드캐스트했으며 eno1IP를 추가하여 네트워크 파일도 업데이트하고 네트워크를 다시 시작했습니다.

그런 다음 Traceroute를 다시 실행하고 server2에서 다음을 가져옵니다.

 # traceroute -T -p 22 <server1.ip>

 traceroute to <server1.ip> (<server1.ip>), 30 hops max, 60 byte packets
 1  gateway (server1.gateway.ip)  0.144 ms  0.159 ms  0.162 ms
 2   
 3  <part.of.hostname>.<city>.us.zip.zayo.com (<random.ip>)  0.946 ms  0.975 ms  0.962 ms
 4  * * <part.of.hostname2>.<city>..us.eth.zayo.com (<random.ip>)  0.896 ms
 5  * * *
 6  <part.of.hostname>.<FullCity>.Level3.net (<random.ip>)  4.022 ms  1.039 ms  1.060 ms
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  *^C

( ^C컨트롤+C로 멈췄기 때문에)

server1에서도 Traceroute를 시도했습니다.

 # traceroute -T -p 22 <server2.ip>

traceroute to <hostname> (<server2.ip>), 30 hops max, 60 byte packets
 1  <some.other.ip> (<same.other.ip>)  0.268 ms  0.281 ms  0.283 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  *^C

이것은 IP를 수정하기 전에 두 서버 모두에서 수행한 작업이지만 여전히 server2에서는 작동하지 않습니다.

그리고 rsyncserver2에서 server1로 이동하는 것이 여전히 중단됩니다.

===============

TCP 덤프

tcpdumpserver1 ---> server1에서 SSH server2 연결을 시도하십시오.

# tcpdump -vv -i eno3 host server2.mydomain.com and port 22
listening on eno3, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
15 packets received by filter
0 packets dropped by kernel

tcpdumpSSH server1 ---> server2에 연결하려고 할 때 server2에서

# tcpdump -vv -i eno1 host server1.mydomain.com and port 22
listening on eno1, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel

( ^CCtrl+C를 누르면 매번 10초 후에 종료됩니다)

===========================

봄 여름 시즌

서버 1에서:

# ss -lt

State       Recv-Q Send-Q            Local Address:Port                             Peer Address:Port
LISTEN      0      45                            *:lrp                                         *:*
LISTEN      0      50                            *:submission                                  *:*
LISTEN      0      45                            *:prp                                         *:*
LISTEN      0      128                           *:pop3                                        *:*
LISTEN      0      45                            *:nbx-ser                                     *:*
LISTEN      0      128                           *:imap                                        *:*
LISTEN      0      128                           *:sunrpc                                      *:*
LISTEN      0      128                           *:webcache                                    *:*
LISTEN      0      45                            *:nbx-dir                                     *:*
LISTEN      0      50                            *:urd                                         *:*
LISTEN      0      128                   127.0.0.1:27217                                       *:*
LISTEN      0      10                      <nn>.14:domain                                      *:*
LISTEN      0      10                      <nn>.13:domain                                      *:*
LISTEN      0      10                      <nn>.12:domain                                      *:*
LISTEN      0      10                      <nn>.11:domain                                      *:*
LISTEN      0      10                      <nn>.10:domain                                      *:*
LISTEN      0      10                       <nn>.9:domain                                      *:*
LISTEN      0      10                       <nn>.8:domain                                      *:*
LISTEN      0      10                       <nn>.7:domain                                      *:*
LISTEN      0      10                       <nn>.6:domain                                      *:*
LISTEN      0      10                       <nn>.5:domain                                      *:*
LISTEN      0      10                       <nn>.4:domain                                      *:*
LISTEN      0      10                       <nn>.3:domain                                      *:*
LISTEN      0      10                       <nn>.2:domain                                      *:*
LISTEN      0      10                    127.0.0.1:domain                                      *:*
LISTEN      0      9                             *:ftp                                         *:*
LISTEN      0      50                            *:smtp                                        *:*
LISTEN      0      128                   127.0.0.1:rndc                                        *:*
LISTEN      0      128                           *:pcsync-https                                *:*
LISTEN      0      45                            *:tsrmagt                                     *:*
LISTEN      0      45                            *:tpcsrvr                                     *:*
LISTEN      0      45                            *:idware-router                               *:*
LISTEN      0      45                            *:autodesk-nlm                                *:*
LISTEN      0      128                           *:imaps                                       *:*
LISTEN      0      45                            *:infowave                                    *:*
LISTEN      0      128                           *:22                                          *:*
LISTEN      0      45                            *:radsec                                      *:*
LISTEN      0      128                           *:pop3s                                       *:*
LISTEN      0      45                            *:gnunet                                      *:*
LISTEN      0      45                            *:eli                                         *:*
LISTEN      0      80                         [::]:mysql                                    [::]:*
LISTEN      0      50                         [::]:submission                               [::]:*
LISTEN      0      128                        [::]:pop3                                     [::]:*
LISTEN      0      128                        [::]:imap                                     [::]:*
LISTEN      0      128                        [::]:sunrpc                                   [::]:*
LISTEN      0      128                        [::]:webcache                                 [::]:*
LISTEN      0      128                        [::]:http                                     [::]:*
LISTEN      0      50                         [::]:urd                                      [::]:*
LISTEN      0      9                          [::]:ftp                                      [::]:*
LISTEN      0      50                         [::]:smtp                                     [::]:*
LISTEN      0      128                        [::]:pcsync-https                             [::]:*
LISTEN      0      128                        [::]:https                                    [::]:*
LISTEN      0      128                        [::]:imaps                                    [::]:*
LISTEN      0      128                        [::]:22                                       [::]:*
LISTEN      0      128                        [::]:pop3s                                    [::]:*

노트:

<nn> is the first part of the IPs, removed for security

서버 2에서:

# ss -lt

State      Recv-Q Send-Q     Local Address:Port                      Peer Address:Port
LISTEN     0      50                     *:submission                           *:*
LISTEN     0      45                     *:prp                                  *:*
LISTEN     0      128                    *:pop3                                 *:*
LISTEN     0      128            127.0.0.1:783                                  *:*
LISTEN     0      45                     *:nbx-ser                              *:*
LISTEN     0      128                    *:imap                                 *:*
LISTEN     0      128                    *:sunrpc                               *:*
LISTEN     0      128                    *:http                                 *:*
LISTEN     0      45                     *:nbx-dir                              *:*
LISTEN     0      50                     *:urd                                  *:*
LISTEN     0      128                    *:domain                               *:*
LISTEN     0      128                    *:ssh                                  *:*
LISTEN     0      50                     *:smtp                                 *:*
LISTEN     0      10             127.0.0.1:rndc                                 *:*
LISTEN     0      128                    *:https                                *:*
LISTEN     0      45                     *:tsrmagt                              *:*
LISTEN     0      45                     *:tpcsrvr                              *:*
LISTEN     0      45                     *:idware-router                        *:*
LISTEN     0      45                     *:autodesk-nlm                         *:*
LISTEN     0      128                    *:imaps                                *:*
LISTEN     0      45                     *:infowave                             *:*
LISTEN     0      45                     *:radsec                               *:*
LISTEN     0      128                    *:pop3s                                *:*
LISTEN     0      45                     *:gnunet                               *:*
LISTEN     0      45                     *:eli                                  *:*
LISTEN     0      80                  [::]:mysql                             [::]:*
LISTEN     0      50                  [::]:submission                        [::]:*
LISTEN     0      128                 [::]:pop3                              [::]:*
LISTEN     0      128                [::1]:783                               [::]:*
LISTEN     0      128                 [::]:imap                              [::]:*
LISTEN     0      128                 [::]:sunrpc                            [::]:*
LISTEN     0      128                 [::]:http                              [::]:*
LISTEN     0      50                  [::]:urd                               [::]:*
LISTEN     0      128                 [::]:domain                            [::]:*
LISTEN     0      128                 [::]:ssh                               [::]:*
LISTEN     0      50                  [::]:smtp                              [::]:*
LISTEN     0      128                 [::]:https                             [::]:*
LISTEN     0      128                 [::]:imaps                             [::]:*
LISTEN     0      128                 [::]:pop3s                             [::]:*

나는 server2의 서버 IP가 이 목록에 없다는 것을 알았습니다. 있어야 하는지는 잘 모르겠지만 모든 서버 IP가 server1의 목록에 있습니다.

평평한

  • ping양방향에서 다른 서버 호스트 이름에 액세스하려는 시도가 중단됩니다.
  • ping다른 서버에서 LIVE DOMAIN을 생성 하려고 해도 중단됩니다! 그러나 실제 도메인 이름은 인터넷을 통해 액세스할 수 있습니다! ping다른 서버의 어느 서버에서나 인터넷에서 도메인이 제대로 작동하도록 할 수 없습니다 !
  • ping google.comPing은 두 서버 모두에서 괜찮습니다.
  • ping <server1.mydomain.com>내 Windows 컴퓨터에서 CMD를 통해 실행합니다.
  • ping <server2.mydomain.com>내 Windows 컴퓨터에서 CMD를 통해 실행합니다.

따라서 두 사이트 모두 ping이 가능하지만 두 서버 사이에서는 불가능합니다. 실제로 다른 서버의 어느 서버에서나 ping을 수행하는 것은 불가능합니다.

백만 번이나 확인했지만 CSF는 이를 멈추지 않았습니다. 두 서버 모두에서 CSF가 완전히 비활성화된 경우에도 동일한 일이 발생합니다. 방금 두 서버 모두에서 CSF를 완전히 비활성화한 다음 양방향에서 다른 서버와 다른 서버의 활성 도메인에 대해 ping을 시도했지만 중단되었습니다.

무엇이 그것을 막고 있을까요?

이제 다른 서버의 IP가 다른 서버의 어느 곳에나 존재하는지 확인해야 합니다.

서버 1에서

# grep -rl "<server2.ip>" "/etc/"
/etc/hosts.allow
/etc/imunify360/whitelist/ext.txt
/etc/csf/csf.allow

서버 2에서

# grep -rl "<server1.ip>" "/etc/"
/etc/hosts.allow
/etc/csf/csf.allow

/var/두 서버 모두 예상대로 결과를 반환하지 않았습니다. 나는 지금 무엇이든 시도하고 있습니다.

===================

iptables-nL

두 서버 모두에서 CSF를 비활성화한 다음 iptables -nL양방향에서 다른 서버를 ping하기 위해 실행하고 다시 시도했습니다.

서버 1에서:

# iptables -nL
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

두 서버 방화벽을 모두 끈 상태에서 server1에서 server2로 ping을 시도해 보세요.

# ping server2.mydomain.com
PING server2.mydomain.com (<server2.ip>) 56(84) bytes of data.
^C
--- server2.mydomain.com ping statistics ---
31 packets transmitted, 0 received, 100% packet loss, time 29995ms

서버 2에서:

# iptables -nL
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

두 서버 방화벽을 모두 끈 상태에서 server2를 server1로 ping해 보십시오.

# ping server1.mydomain.com
PING server1.mydomain.com (<server1.ip>) 56(84) bytes of data.
^C
--- server1.mydomain.com ping statistics ---
34 packets transmitted, 0 received, 100% packet loss, time 32999ms

======================

업데이트: 추가할 사항이 몇 가지 더 있습니다. 이번에는 출력을 얻었습니다! 도움이 될지 잘 모르겠습니다

TCP 덤프

server1에서 시작하여 tcpdumpserver1에서 실행한 후 server2로 이동하여 sshserver2에서 server1로 이동을 시도합니다.

뭔가 잡았어요! ! ssh는 여전히 응답하지 않고 연결되지 않지만 아마도 도움이 될 것입니다.

*** 서버 1 출력 ***

    # tcpdump -vv -i eno3 host server2.mydomain.com and port 22
    tcpdump: listening on eno3, link-type EN10MB (Ethernet), capture size 262144 bytes
    11:26:14.056746 IP (tos 0x0, ttl 55, id 53597, offset 0, flags [DF], proto TCP (6), length 60)
        <server2.ip>.58458 > <server1.ip>.ssh: Flags [S], cksum 0x4391 (correct), seq 3670869813, win 29200, options [mss 1460,sackOK,TS val 298702440 ecr 0,nop,wscale 7], length 0
    11:26:14.056773 IP (tos 0x0, ttl 64, id 53250, offset 0, flags [DF], proto TCP (6), length 40)
        <server1.ip>.ssh > <server2.ip>.58458: Flags [R.], cksum 0x05a7 (correct), seq 0, ack 3670869814, win 0, length 0
    11:26:15.058440 IP (tos 0x0, ttl 55, id 53598, offset 0, flags [DF], proto TCP (6), length 60)
        <server2.ip>.58458 > <server1.ip>.ssh: Flags [S], cksum 0x3fa7 (correct), seq 3670869813, win 29200, options [mss 1460,sackOK,TS val 298703442 ecr 0,nop,wscale 7], length 0
    11:26:15.058470 IP (tos 0x0, ttl 64, id 53688, offset 0, flags [DF], proto TCP (6), length 40)
    <...>
    ^C
    6 packets captured
    6 packets received by filter
    0 packets dropped by kernel

아이퍼프

*** 그리고 server1 출력***

    # iperf -s
    ------------------------------------------------------------
    Server listening on TCP port 5001
    TCP window size: 85.3 KByte (default)
    ------------------------------------------------------------

관련 정보