OPNsense Forum

International Forums => German - Deutsch => Topic started by: Andreas on October 29, 2016, 07:17:56 pm

Title: Firewall beachtet Routen nicht
Post by: Andreas on October 29, 2016, 07:17:56 pm
Hi ich hab ver. Statische Routen eingetragen. Nur beachtet OPNsense die nicht
Im Status werden die Routen auch angezeigt aber weder im Tracert noch sonst wie sind die IPs erreichbar...
die Route wird anscheinend nicht verwendet ?!

Bsp
ipv4   10.100.0.0/16   10.100.42.254   UGS   7   1500   em1_vlan700      
ipv4   10.100.42.0/24   link#21   U   4   1500   em1_vlan700      
ipv4   10.100.42.1   link#21   UHS   0   16384   lo0       
ipv4   193.29.196.0/22   10.100.42.254   UGS   0   1500   

Anbei die Ausgabe der Firewall selber bei traceroute
Code: [Select]
traceroute to 10.100.15.15 (10.100.15.15), 18 hops max, 40 byte packets
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
traceroute: sendto: No route to host
 1  * * *
 2  *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
 3 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
 4 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
 5 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
 6 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
 7 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
 8 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
 9 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
10 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
11 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
12 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
13 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
14 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
15 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
16 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
17 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *
18 traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *traceroute: wrote 10.100.15.15 40 chars, ret=-1
 *

Title: Re: Firewall beachtet Routen nicht
Post by: franco on October 30, 2016, 10:54:19 am
Alle Firewall-Gateway Regeln (auch für Multi-WAN) hebeln die Systemrouten aus. Die Gateway-Regeln müssen ordnungsgemäße Ausnahmen haben. Vielleicht ist es das?
Title: Re: Firewall beachtet Routen nicht
Post by: Andreas on October 30, 2016, 02:10:17 pm
Was meinst du mit Ausnahmen?
Title: Re: Firewall beachtet Routen nicht
Post by: Andreas on October 30, 2016, 03:57:50 pm
Bevor ich es vergesse
Das Setup lief so
Die Probleme entstanden nach einem Neustart
Was ich am wenigsten verstehe ist wenn ich einen Ping im Transfer Netz
Zu dem 10.100.0.0/16 Netz aus löse kommt selbst da die Meldung
Host not reachable
Title: Re: Firewall beachtet Routen nicht
Post by: franco on October 30, 2016, 05:09:54 pm
Hallo Andreas,

Nun, Host Unreachable ist ziemlich leicht erklärt wenn die Gateway-Regeln auf "Destination any" gestellt sind, was z.B. im normalen Multi-WAN der Fall ist. Der Traffic wird ins Internet geschoben, da kann man die Server--da es private Adressen sind--nicht erreichen.

Alle privaten erreichbaren Netze müssen aus den Gateway-Regeln ausgeschlossen werden, das kann z.B. über einen einfachen Alias mit Destination Invert flag und dem Alias leicht machbar ist.

Generell ist zu prüfen wohin die Pakete übergeben werden (packet capture auf den einzelnen Interfaces), da diese nicht einfach verschwinden.

Da ich nicht weiß welche Netze neu oder wie erreichbar sind, ist es schwierig zu helfen.


Grüsse
Franco
Title: Re: Firewall beachtet Routen nicht
Post by: Andreas on October 30, 2016, 06:28:14 pm
Quote
Gateway-Regeln auf "Destination any" gestellt sind
meinst du damit bei den Regeln die Einstellungen des Gateways?
das ist auf standard
wenn ich mir den route status angucke ist die route ja richtig eingetragen nur "wirkt" sie scheinbar nicht

Situation ist

LAN Netz --- FW (OPNsense) ---direkt verbunden über CAT--- FW (Sophos)--- Fremdes Netz (10.100.0.0/16)
Title: Re: Firewall beachtet Routen nicht
Post by: franco on October 31, 2016, 12:56:53 pm
Ich weiß leider nicht was "standard" bedeutet. Falls standard "any", dann ist es hier nicht korrekt für den Anwendungsfall.
Title: Re: Firewall beachtet Routen nicht
Post by: Andreas on October 31, 2016, 09:10:57 pm
Standard denke ich ist doch einfach das normale Routing
Also ohne rule based
Wenn ich zus zur statischen Route noch rule based routing mache gibt's ne Art
Was ich halt nicht versteh ist das die Route richtig eingetragen sind die Firewall aber das Ziel
Quasi nicht kannte