LVS는 외부에서 접근이 불가능합니다.

LVS는 외부에서 접근이 불가능합니다.

나는 현재 설정하느라 바쁩니다.LVS - 리눅스 가상 서버:

root@debian1:~# ipvsadm -L
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  debian1.lan:http wlc
  -> debian2.lan:http             Masq    1      0          1         
  -> debian3.lan:http             Masq    1      0          1         

debian1.lan은 나의 VIP입니다. debian2와 3은 아파치를 실행하고 있습니다.

curl콘텐츠를 얻는 데 사용할 수 있습니다 .

root@debian1:~# curl debian1.lan
<html><body><h1>debian2</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>

하지만 내 Windows 컴퓨터에서 debian1.lan(10.0.0.171)에 액세스하면 firefox"연결 시간이 초과되었습니다"라는 메시지가 나타납니다.

Virtualbox가 LVS를 망칠 가능성이 있습니까? (debian 1~3은 브리지 어댑터를 사용하는 Virtualbox의 VM입니다.)

tcpdumpdebian2에서 시작했는데 firefox의미는 잘 모르겠지만 패킷이 표시됩니다( 를 사용할 때).

root@debian2:~# tcpdump -s 0 -A tcp port http
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
13:07:05.725727 IP My-PC.lan.54663 > debian2.lan.http: Flags [S], seq 1738645408, win 8192, options [mss 1460,nop,wscale 2,nop,nop,sackOK], length 0
[email protected]
...
......Pg......... .\...............
13:07:05.725755 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:06.722025 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:08.722729 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:08.723841 IP My-PC.lan.54663 > debian2.lan.http: Flags [S], seq 1738645408, win 8192, options [mss 1460,nop,wscale 2,nop,nop,sackOK], length 0
E..4.a@.....
...
......Pg......... .\...............
13:07:08.723849 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:12.722808 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:14.724158 IP My-PC.lan.54663 > debian2.lan.http: Flags [S], seq 1738645408, win 8192, options [mss 1460,nop,nop,sackOK], length 0
E..0.g@.....
...
......Pg.......p. .p...........
13:07:14.724179 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:20.722805 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............

내가 할 수 있는 일이나 다음에 확인해야 할 일에 대해 누군가 나에게 도움이 되는 힌트를 줄 수 있습니까?

답변1

마침내 이것이 작동하게 되었습니다. 해결책은 LVS의 실제 서버를 위해 완전히 새로운 개인 네트워크를 만드는 것이었습니다. 저는 192.168.1.x를 사용했습니다(물론 디렉터도 이 네트워크에 액세스해야 합니다). VIP의 경우 공용 IP 주소 10.0.0.x를 사용했습니다. 또한 내 LVS의 실제 서버에서 이전 네트워크(10.0.0.x)의 모든 흔적을 제거해야 했습니다.

root@debian1:~# ipvsadm -L --stats
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port               Conns   InPkts  OutPkts  InBytes OutBytes
  -> RemoteAddress:Port
TCP  debian1.lan:http                   45      269      167    27483    27061
  -> 192.168.1.2:http                   21      118       74    11370    11912
  -> 192.168.1.3:http                   24      151       93    16113    15149

이것이 동일한 문제를 가진 누군가에게 도움이 되기를 바랍니다.

관련 정보