Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

generelle Frage zu Firewall-Regeln

Hallo,

ich habe eine generelle Frage zu den Firewall-Regeln:

Wenn ich eine Regel erstelle z.B.

Internal -> Port ... -> any

So ist dieses doch nur eine Regel von innen nach außen oder?

D.h. nach innen kann jemand nur über den Port zugreifen, wenn vorher ein Client aus dem internen Netzwerk nach außen über den Port an eine Adresse zugegriffen hat oder?

Muss man sich bei diesen Regeln sorgen machen, wenn als Ziel "any" definiert wird? Oder ist es hier ratsam, auch immer nur das betreffende Ziel anzugeben? Teilweise ist dieses ja nicht immer defnierbar...

 

Gruß und dank



This thread was automatically locked due to age.
  • Entschuldige mich für Antwort in English:

    This is indeed only a rule from inside to any (not just outside but any other network).

    If you make a connection from inside to somewhere else then return traffic usually is possible (not just over this port since communication takes place TO the port you define but FROM a very different port usually. However that is not a problem.

    Going to any is not really a problem but as I said before any is really any (also possibly networks on the other side of VPN-tunnels you may have or other network segments inside your own infrastructure. If the traffic is going to "the Internet" then you can use the definition Internet IPv4 and/or Internet IPv6 instead of any.

    The safest option however is to only allow the traffic to the destination(s) the traffic is destined for. Ports that are not open to every location in the world also can not be used to communicate over (imagine some ransomware that's trying open ports to phone home to send the encryption key, if it can't phone home you may be lucky).

    If you do some research you will find that for a lot of services you can find the destination (either an IP-address or -range or a DNS-hostname) and indeed sometimes it's just not possible to determine what is the exact destination. In that case make sure you define the Port(s) as good a possible and use Internet IPv4/6 as destination.


    Managing several Sophos UTMs and Sophos XGs both at work and at some home locations, dedicated to continuously improve IT-security and feeling well helping others with their IT-security challenges.

    Sometimes I post some useful tips on my blog, see blog.pijnappels.eu/category/sophos/ for Sophos related posts.

  • Thank you!

    So what should be the destination for WhatsApp? This ist, für what I need the rule.

    Can you say me which destination I should write instead of any?

  • I think Whatsapp is an example that needs Internet IPv4/6 as destination. I couldn't find something really that gives either a hostname or a "fixed" ip-range that's being used by it.

    Also there's quite some ports (both UDP and TCP) that are used by Whatsapp depending on what you want to allow (voice/video calling for example).

    You can however regulate this traffic to a certain amount through application control rules (you can use this ie to block calling or location sending while still allowing normal messaging).


    Managing several Sophos UTMs and Sophos XGs both at work and at some home locations, dedicated to continuously improve IT-security and feeling well helping others with their IT-security challenges.

    Sometimes I post some useful tips on my blog, see blog.pijnappels.eu/category/sophos/ for Sophos related posts.

  • Hallo Frederik,

    als Antwort kann man ein klares JEIN geben. Die SG UTM ist eine "stateful" Firewall, dass heisst, wenn eine Regel wir oben definiert ist, dann "merkt" sich die Firewall verschiedene DInge:

    Quell-IP - stammt diese aus der Zone, die "Interrnal" zugeordnet ist? JA - ok weiter in dieser Regelauswertung

    Trifft der (Ziel-)Port zu? - Ja - OK weiter wie oben

    Trifft die Ziel-Zone zu? - Ja - OK weiter wie oben

    Wenn diese Entscheidungen alle positiv waren, dann wird das Paket durchgelassen UND die Firewall führt eine Tabelle, wer diese Kommunikation initiert hat, damit die Antwort-Pakete für diesen Partner wiederum rückwärts durch die Firewall passieren dürfen.

    Es ist also gerade nicht so, dass dann ALLE von aussen diesen Kanal mitbenutzen dürften, das wäre ja sicherheitstechnisch ganz furchtbar!

    Wenn du von aussen nach innen zugreifen willst, dann musst eine DNAT-Regel bauen, die dann im Prinzip ähnlich funktioniert. Aber NAT ist generell nochmal ein anderes Thema.

    Ich plädiere dafür, "ANY" Regeln sehr sparsam einzusetzen. Besser ist es, einen Dienst explizit zuzulassen, wenn man die benötigten Ports kennt und/oder die Zielserver-IPs.

    Mit freundlichem Gruß, best regards from Germany,

    Philipp Rusch

    New Vision GmbH, Germany
    Sophos Silver-Partner

    If a post solves your question please use the 'Verify Answer' button.

  • Hallo Philipp,

    danke für deine Antwort.

    Jetzt habe ich die Logik dahinter verstanden!

    Ich habe eigentlich nur zwei Regeln bei mir, wo das Ziel "any" ist.

    Einmal für WhatsApp und einmal für den TeamViewer.

    Weißt du zufällig, ob ich diese beiden Ziele auch konkreter fassen kann, sodass ich auch hier das any wegbekomme?

     

    Vielen Dank schonmal im Voraus

  • Hallo Frederik,

    WhatsApp ist so ein Thema... Ich habe das so gelöst (auf tcp und udp achten):


    Mit freundlichem Gruß, best regards from Germany,

    Philipp Rusch

    New Vision GmbH, Germany
    Sophos Silver-Partner

    If a post solves your question please use the 'Verify Answer' button.

  • Ah ok,

    und was hast du als Ziel genommen?

    Jetzt hast du da ja nur die Dienste definiert oder?

    Meine Regel sieht so aus und scheint zu funktionieren:

    Wobei bei mir diese 4 Ports alles TCP-Ports sind.

  • Hi Frederik,

    die benötigten Ports hängen von der Funktion ab, die du in WhatsApp nutzt. WhatsApp voice call oder Media Upload usw.

    Zu den Server-IP Adressen lässt sich WhatsApp nicht aus, die FAQ von denen ist da sehr bescheiden mit Infos. Also ANY oder Internet IPv4

    Mit freundlichem Gruß, best regards from Germany,

    Philipp Rusch

    New Vision GmbH, Germany
    Sophos Silver-Partner

    If a post solves your question please use the 'Verify Answer' button.

  • Ok, besten Dank!

    Kannst du zufällig was zu Teamviewer sagen?

  • Aua!

    Mit freundlichem Gruß, best regards from Germany,

    Philipp Rusch

    New Vision GmbH, Germany
    Sophos Silver-Partner

    If a post solves your question please use the 'Verify Answer' button.