LVSは外部からアクセスできません

LVSは外部からアクセスできません

私は現在、LVS - Linux 仮想サーバー:

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 は apache を実行しています。

コンテンツを取得するために使用できます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

これが同じ問題を抱えている誰かの助けになれば幸いです。

関連情報