Ferm: Unterschied zwischen den Versionen
Erscheinungsbild
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…“ |
Dirk (Diskussion | Beiträge) K stil |
||
| (3 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
{{SEITENTITEL:ferm}} | {{SEITENTITEL:ferm}} | ||
ferm - ausgesprochen „firm“, steht für „For Easy Rule Making“. Es dient dazu Firewall-Regeln basierend auf [[iptables]] konfigurieren und beim Systemstart laden. | |||
ferm | {{Installation|repo=extra|paket=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 == | == 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. | |||
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; | |||
} | |||
== Weblinks == | |||
* [http://ferm.foo-projects.org Offizielle Website] {{sprache|en}} | |||
[[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;
}