Zum Inhalt springen

Ferm: Unterschied zwischen den Versionen

Aus wiki.archlinux.de
Jewox (Diskussion | Beiträge)
Die Seite wurde neu angelegt: „{{SEITENTITEL:ferm}} {{righttoc}} ferm - ausgesprochen "firm", steht für "For Easy Rule Making". Mit ferm kannst du Firewall-Regeln basierend auf iptables…“
 
K stil
 
(3 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
{{SEITENTITEL:ferm}}
{{SEITENTITEL:ferm}}
{{righttoc}}
ferm - ausgesprochen „firm“, steht für „For Easy Rule Making“. Es dient dazu Firewall-Regeln basierend auf [[iptables]] konfigurieren und beim Systemstart laden.


ferm - ausgesprochen "firm", steht für "For Easy Rule Making".
{{Installation|repo=extra|paket=ferm}}


Mit ferm kannst du Firewall-Regeln basierend auf [[iptables]] konfigurieren und beim Systemstart laden.
Nach der installation muss der Service noch aktiviert werden


{{Installation|repo=community|paket=ferm}}
systemctl enable ferm.service        # Service nur aktivieren …
systemctl enable --now ferm.service  # … oder Service aktivieren und direkt starten


== Konfiguration ==
== Konfiguration ==
Die Konfigurationsdatei {{ic|/etc/ferm.conf}} enthält bereits Firewall-Regeln für ein Desktop-System. Weitere Beispiele sind in {{ic|/usr/share/doc/ferm/examples/}} zu finden.


Die Konfigurationsdatei {{ic|/etc/ferm.conf}} enthält bereits Firewall-Regeln für ein Desktop-System.
Bei bereits geladenen Firewall-Regeln kann man diese in die ferm-Konfiguration übernehmen


Weitere Beispiele findest du im Verzeichnis {{ic|/usr/share/doc/ferm/examples/}}.  
import-ferm > /etc/ferm.conf


== ferm Import ==
== Befehl ==
Dies lädt die Firewall-Regeln in das netfilter framework des Kernels.


Bei geladenen Firewall-Regeln wird
ferm /etc/ferm.conf


# import-ferm > /etc/ferm.conf
Man kann dies wie folgt überprüfen.


diese übernehmen.
iptables -L -v
ip6tables -L -v


== ferm Befehl ==
== Beispielkonfiguration ==
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;
}


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


Überprüfen kannst du dies mittels
* [http://ferm.foo-projects.org Offizielle Website] {{sprache|en}}
 
# iptables -L
 
== ferm Service ==
 
# systemctl enable --now ferm.service # Für den automatischen Start vormerken und direkt starten
 
== Siehe auch ==
 
Homepage [http://ferm.foo-projects.org ferm]


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

Aktuelle Version vom 2. Dezember 2025, 07:42 Uhr

ferm - ausgesprochen „firm“, steht für „For Easy Rule Making“. Es dient dazu Firewall-Regeln basierend auf iptables konfigurieren und beim Systemstart laden.

Installation

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

pacman -S ferm

Nach der installation muss der Service noch aktiviert werden

systemctl enable ferm.service        # Service nur aktivieren …
systemctl enable --now ferm.service  # … oder Service aktivieren und direkt starten

Konfiguration

Die Konfigurationsdatei /etc/ferm.conf enthält bereits Firewall-Regeln für ein Desktop-System. Weitere Beispiele sind in /usr/share/doc/ferm/examples/ zu finden.

Bei bereits geladenen Firewall-Regeln kann man diese in die ferm-Konfiguration übernehmen

import-ferm > /etc/ferm.conf

Befehl

Dies lädt die Firewall-Regeln in das netfilter framework des Kernels.

ferm /etc/ferm.conf

Man kann dies wie folgt überprüfen.

iptables -L -v
ip6tables -L -v

Beispielkonfiguration

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;
}