Ferm: Unterschied zwischen den Versionen

Aus wiki.archlinux.de
K (Bsp hinzugefügt)
K (→‎Siehe auch: --> Weblinks)
Zeile 91: Zeile 91:
  }
  }


== Siehe auch ==
== Weblinks ==


Homepage [http://ferm.foo-projects.org ferm]
* Homepage [http://ferm.foo-projects.org ferm] {{sprache|en}}


[[Kategorie:Sicherheit]]
[[Kategorie:Sicherheit]]

Version vom 5. Februar 2017, 16:10 Uhr


ferm - ausgesprochen "firm", steht für "For Easy Rule Making".

Mit ferm kannst du Firewall-Regeln basierend auf iptables konfigurieren und beim Systemstart laden.

Installation

Das Programm ist als ferm in community verfügbar, und kann von dort mittels Pacman installiert werden.

pacman -S ferm

Konfiguration

Die Konfigurationsdatei /etc/ferm.conf enthält bereits Firewall-Regeln für ein Desktop-System.

Weitere Beispiele findest du im Verzeichnis /usr/share/doc/ferm/examples/.

ferm Import

Bei geladenen Firewall-Regeln wird

# import-ferm > /etc/ferm.conf

diese übernehmen.

ferm Befehl

# ferm /etc/ferm.conf # Lädt die Firewall-Regeln in das netfilter framework des Kernels.

Überprüfen kannst du dies mittels

# iptables -L -v
# ip6tables -L -v

ferm Service

# systemctl enable --now ferm.service # Für den automatischen Start vormerken und direkt starten

ferm Beispiel

table filter {
    chain INPUT {
        policy DROP;

        # connection tracking
        mod state state INVALID DROP;
        mod state state (ESTABLISHED RELATED) ACCEPT;

        # allow local connections
        interface lo ACCEPT;

        # respond to ping
        proto icmp icmp-type echo-request ACCEPT;

        # ident connections are also allowed
        proto tcp dport auth ACCEPT;

        # the rest is dropped by the above policy
    }

    # outgoing connections are not limited
    chain OUTPUT policy ACCEPT;

    # this is not a router
    chain FORWARD policy DROP;
}

domain ip6 table filter {
    chain INPUT {
        policy DROP;

        # connection tracking
        mod state state INVALID DROP;
        mod state state (ESTABLISHED RELATED) ACCEPT;

        # allow local connections
        interface lo ACCEPT;

        # allow ICMP (for neighbor solicitation, like ARP for IPv4)
        proto ipv6-icmp ACCEPT;

        # ident connections are also allowed
        proto tcp dport auth ACCEPT;

        # the rest is dropped by the above policy
    }

    # outgoing connections are not limited
    chain OUTPUT policy ACCEPT;

    # this is not a router
    chain FORWARD policy DROP;
}

Weblinks