Difference between revisions of "Firewall"
(Created page with "Different ways to handle <code>iptables</code>. == Using <code>iptable-persistent</code> on Debian == '''Note:''' In use on <code>vrijdagmiddagborrel</code> It's basically...") |
|||
Line 1: | Line 1: | ||
Different ways to handle <code>iptables</code>. | Different ways to handle <code>iptables</code>. | ||
− | == Using <code> | + | == Using <code>iptables-persistent</code> on Debian == |
− | '''Note:''' In use on <code>vrijdagmiddagborrel</code> | + | '''Note:''' In use on <code>vrijdagmiddagborrel</code>. |
− | It's basically a set of plugins for <code>netfilter- | + | It's basically a set of <code>iptables</code> plugins for <code>netfilter-persistent</code>, which itself is a loader for different netfilter configuration. Once installed, it will take care of restoring rules at boot time, and through a small helper, can be used to reload/update/save rules on the fly. |
=== Installation and config === | === Installation and config === | ||
− | * | + | * Installation: |
− | apt install iptables-persistent netfilter-persistent | + | apt install iptables-persistent netfilter-persistent |
+ | * Add/change iptables rules located at <code>/etc/iptables/rules.v4</code> and <code>/etc/iptables/rules.v6</code> | ||
+ | |||
+ | === Usage === | ||
+ | * Apply new rules after changes made to rules.v* files and check result | ||
+ | netfilter-persistent reload | ||
+ | iptables -L | ||
+ | |||
+ | |||
+ | == <code>iptables</code> oneliners == | ||
+ | * list all rules from all chains | ||
+ | iptables -L |
Revision as of 17:59, 16 December 2019
Different ways to handle iptables
.
Contents
Using iptables-persistent
on Debian
Note: In use on vrijdagmiddagborrel
.
It's basically a set of iptables
plugins for netfilter-persistent
, which itself is a loader for different netfilter configuration. Once installed, it will take care of restoring rules at boot time, and through a small helper, can be used to reload/update/save rules on the fly.
Installation and config
- Installation:
apt install iptables-persistent netfilter-persistent
- Add/change iptables rules located at
/etc/iptables/rules.v4
and/etc/iptables/rules.v6
Usage
- Apply new rules after changes made to rules.v* files and check result
netfilter-persistent reload iptables -L
iptables
oneliners
- list all rules from all chains
iptables -L