LVS ist von außen nicht zugänglich

LVS ist von außen nicht zugänglich

Ich bin derzeit mit der Einrichtung einesLVS - Virtueller Linux-Server:

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 ist mein VIP. debian2 und 3 führen Apache aus.

Ich kann Folgendes verwenden, curlum Inhalte abzurufen:

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>

Aber wenn ich von meinem Windows-Computer aus auf debian1.lan (10.0.0.171) zugreife, firefoxerhalte ich die Meldung „Die Verbindung ist abgelaufen“.

Ist es vielleicht möglich, dass Virtualbox das LVS durcheinanderbringt? (Debian 1 bis 3 sind VMs in Virtualbox, die einen überbrückten Adapter verwenden).

Ich habe tcpdumpmein Debian2 gestartet und sehe Pakete (wenn ich verwende firefox), obwohl ich mir über die Bedeutung nicht sicher bin:

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..............

Kann mir jemand einen hilfreichen Tipp geben, was ich als nächstes tun oder prüfen kann?

Antwort1

Ich habe es endlich zum Laufen gebracht. Die Lösung bestand darin, ein völlig neues privates Netzwerk für die realen Server im LVS zu erstellen. Ich habe 192.168.1.x verwendet (natürlich benötigt der Direktor auch Zugriff auf dieses Netzwerk). Für die VIP habe ich meine öffentliche IP-Adresse 10.0.0.x verwendet. Darüber hinaus musste ich alle Spuren meines alten Netzwerks (10.0.0.x) von den realen Servern in meinem LVS entfernen.

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

Hoffentlich hilft dies jemandem mit dem gleichen Problem.

verwandte Informationen