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「Connection timed out」というメッセージが表示されます。

VirtualboxはLVSを台無しにすることができますか? (debian 1〜3は、ブリッジアダプタを使用するVirtualboxの仮想マシンです。)

私は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

これが同じ問題を抱えている人に役立つことを願っています。

おすすめ記事