Bridge physdev und transparent Proxy...

jeudi 8 juin 2017

Hallo

seit Tagen versuche ich jetzt auf meiner Bridge zwischen LAN und WAN einen transparent Proxy aufzusetzen. Ich habe wirklich alles, was es im Netz dazu gibt, gelesen bzw. ausprobiert, aber ich finde keine Lösung.
Die Bridge funktioniert ohne Probleme, aber ich kann kein redirect auf einen Proxy einrichten.
Ich bekomme es hin, über FORWARD physdev-is-bridged Pakete zu filtern/loggen, aber alles was über physdev-in oder physdev-out läuft, wird schlicht weg ignoriert und es kommen keine Pakete an. Somit kann ich auch kein PREROUTING setzen, da ja keine Pakete ankommen. Und ich habe wirklich alles an Kombinationen probiert, was mir eingefallen ist.

Beispiel:
LAN=enp26s0
WAN=enp24s0
Bridge=br0
Bridge-IP=192.168.50.249

Code:

Chain PREROUTING (policy ACCEPT 2181 packets, 193K bytes)
 pkts bytes target    prot opt in    out    source              destination
    0    0 DNAT      tcp  --  *      *      0.0.0.0/0            0.0.0.0/0            PHYSDEV match --physdev-in enp26s0 tcp dpt:80 to:127.0.0.1:8118
    0    0 DNAT      tcp  --  *      *      0.0.0.0/0            0.0.0.0/0            PHYSDEV match --physdev-is-bridged tcp dpt:80 to:127.0.0.1:8118
    0    0 REDIRECT  tcp  --  *      *      0.0.0.0/0            0.0.0.0/0            PHYSDEV match --physdev-in enp26s0 tcp dpt:80 redir ports 8118
    0    0 REDIRECT  tcp  --  *      *      0.0.0.0/0            0.0.0.0/0            PHYSDEV match --physdev-is-bridged tcp dpt:80 redir ports 8118
    0    0 DNAT      tcp  --  *      *      0.0.0.0/0            0.0.0.0/0            PHYSDEV match --physdev-in br0 tcp dpt:80 to:127.0.0.1
    0    0 DNAT      tcp  --  *      *      0.0.0.0/0            0.0.0.0/0            PHYSDEV match --physdev-in enp26s0 tcp dpt:80 to:127.0.0.1
    0    0 DNAT      tcp  --  *      *      0.0.0.0/0            0.0.0.0/0            PHYSDEV match --physdev-in enp24s0 tcp dpt:80 to:127.0.0.1
    0    0 DNAT      tcp  --  *      *      0.0.0.0/0            0.0.0.0/0            PHYSDEV match --physdev-is-bridged tcp dpt:80 to:127.0.0.1
  88 10685 DNAT      tcp  --  *      *      !192.168.50.249      !192.168.50.0/24      tcp dpt:80 to:127.0.0.1:8118
    0    0 DNAT      tcp  --  *      *      !127.0.0.1          !192.168.50.0/24      tcp dpt:80 to:127.0.0.1:8118

Wie man sieht, kommt auf PREROUTING mit physdev-in absolut nichts an. Dafür ohne physdev aus dem LAN zum Proxy, welches aber vom Proxy wieder nicht weiter geleitet wird, warum auch immer. Anscheinend wird es blockiert.

Kernel-Konfiguration und sysctrl stimme, habe ich überprüft. Sonst fällt mir nichts mehr ein...

Hat irgend jemand schon mal einen transparent Proxy auf einer Bridge zum Laufen bekommen?

Robert


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor