Hallo Oliver, ich danke Ihnen für Ihre schnelle Antwort der letzten Woche.
Benutzen Sie Ihre Beratungs-und 'iptables-t nat - list-v' konnte ich meine NAT'ing konfiguriert und funktioniert. Wir sind mit Mehrwegeausbreitung mit NAT für ausgehende Schnittstellen.
Allerdings war ich noch Probleme mit Sessions fallengelassen werden aufgrund der Multipath-Routing-Entscheidungen verändert, wenn die Route-Cache geleert wurde.
Ich konnte sehen, dass die Sitzungen starb, sobald die IP-Route zeigen, cache 'berichtet, hatte die Route geändert. Dieses Problem ist ein Ergebnis von Securepoint nicht in einer Weise statefull.
FIX: Implementierung von statefull Packet Inspection;
Das erste Paket der jede Verbindung geroutet wird durch die Multipath-Routing. Dies geschieht nach der PREROUTING, wie Sie wissen. Und das ist das, was wir wollen, Vermietung der Kernel entscheiden auf der Grundlage der Gewichte.
Dieses Paket kann dann markiert POSTROUTING (so dass die lokalen Pakete können auch gefangen werden). Markieren Sie es und speichern Sie sie.
Die Marke ist decodiert die gewählte abgehende Schnittstelle (zB:-o WAN1 - gesetzte Markierung 1,-o Wan2 - set-mark 2).
In PREROUTING können wir dann mit 'Wiederherstellen-Marke ". Wenn das Paket gehört zu einer Verbindung, die bereits ein Paket verschickt, so wird die Marke wieder in POSTROUTING und wird dann geroutet werden durch die entsprechenden Routing-Tabelle.
Handelt es sich um ein neues Paket, es wird dann von der Multipath-Routing-Anweisungen, da keine Marke vorhanden ist, usw.
Ich setzte die nachfolgenden als 'root';
# iptables-A POSTROUTING-t mangle-j MARK - set-mark 1-m state - Zustand NEU-o eth0
# iptables-A POSTROUTING-t mangle-j MARK - set-mark 2-m state - Zustand NEU-o eth2
# iptables-A POSTROUTING-t mangle-j CONNMARK - save-mark-m state - Zustand NEU
# iptables-A PREROUTING-t mangle-j CONNMARK - wiederherstellen-Marke
Route folgenden Pakete basieren auf der restaurierten Marke
# ip-Regel hinzufügen fwmark 1-Lookup 1
# ip add fwmark Regel 2-Lookup 2
# iptables-A POSTROUTING-t nat-m-Marke - Marke 1-j SNAT - to-source 11.1.1.1-o eth0
# iptables-A POSTROUTING-t nat-m-Marke - Marke 2-j SNAT - to-source 22.2.2.2-o eth2
Nach dem Ausführen der oben genannten Befehle zu ermöglichen, SPI (Statefull Packet Inspection) das Problem der sterbenden sesisons festgesetzt worden war und Verbindungen nicht sterben nach einigen Stunden des Testens.
Doch nach der Umsetzung dieses Update nur die Probleme gefunden wurden;
Port 80 (http) würde nicht funktionieren, es sei denn, squid wurde aktiviert.
Port 443 (https) würde nicht funktionieren überhaupt.
Wie können wir dauerhaft aktivieren SPI in securepoint, und wie kann ich dieses Problem beheben der Port 80 und 443?
Auch wissen Sie, wenn alle anderen Häfen sind affted ähnlich Ports 80 und 443?
Referenz:
http://imbezol.org/loadbalance.php
http://www.realvnc.com/pipermail/vnc-li ... 49651.html
---------------------------
Hello Oliver, thank you for your quick reply last week.
Using your advice and 'iptables -t nat --list -v' I was able to get my NAT'ing configured and working properly. We are using multipath with NAT on outbound interfaces.
However I was still having problems with sessions being dropped due to the multipath routing decisions changing when the route cache was flushed.
I could see that the sessions died as soon as 'ip show route cache' reported the route had changed. This problem is a result of Securepoint not operating in a statefull manner.
FIX: Implement statefull packet inspection;
The first packet of any connection gets routed by the multipath routing. This happens after PREROUTING, as you know. And this is what we want, letting the kernel decide based on the weights.
This packet can then be marked in POSTROUTING (so that local packets also can be caught). Mark it and save it.
The mark is decoded by the chosen outgoing interface (eg: -o WAN1 --set mark 1, -o WAN2 --set-mark 2).
In PREROUTING we can then use 'restore-mark'. If the packet belongs to a connection that has already sent a packet, this will restore the mark set in POSTROUTING and will then be routed by the corresponding routing table.
If it is a new packet, it will be routed by the multipath routing statements since no mark exists, etc.
I implemented the folling as 'root';
#iptables -A POSTROUTING -t mangle -j MARK --set-mark 1 -m state --state NEW -o eth0
#iptables -A POSTROUTING -t mangle -j MARK --set-mark 2 -m state --state NEW -o eth2
#iptables -A POSTROUTING -t mangle -j CONNMARK --save-mark -m state --state NEW
#iptables -A PREROUTING -t mangle -j CONNMARK --restore-mark
Route following packets based on the restored mark
#ip rule add fwmark 1 lookup 1
#ip rule add fwmark 2 lookup 2
#iptables -A POSTROUTING -t nat -m mark --mark 1 -j SNAT --to-source 11.1.1.1 -o eth0
#iptables -A POSTROUTING -t nat -m mark --mark 2 -j SNAT --to-source 22.2.2.2 -o eth2
After running the above commands to enable SPI (Statefull Packet Inspection) the problem of dieing sesisons was fixed and connections did not die after several hours of testing.
However, after implementing this fix the only problems found were;
port 80 (http) would not work unless squid was enabled.
port 443 (https) would not work at all.
How can we permanently enable SPI in securepoint and how can i fix the port 80 and 443 issue?
Also do you know if any other ports are affted similar to ports 80 and 443?
Ref:
http://imbezol.org/loadbalance.php
http://www.realvnc.com/pipermail/vnc-li ... 49651.html