You've loaded an old revision of the document! If you save it, you will create a new version with this data. Media Files====== Set up iptables ====== ===== Check rules ===== The following command lists all valid rules for iptables: <code bash> iptables -L </code> ===== Save rules to a file ===== <code bash> apt-get update apt-get install iptables-persistent nano /etc/iptables.test.rules ^O ^X </code> The iptables.test.rules file can now be edited. {{tag>deutsch linux debian}} ===== Define rules ===== [[linux:firewall_rules|iptable rules]] can now be defined accordingly. ===== Activate rules in productive operation ===== <code bash> iptables-save > /etc/iptables.up.rules nano /etc/network/if-pre-up.d/iptables ^O ^X </code> The file /etc/network/if-pre-up.d/iptables is executed at system startup and loads the corresponding firewall rules. The following lines must be inserted here: <code bash> #!/bin/bash /sbin/iptables-restore < /etc/iptables.up.rules </code> Now make the file executable and that's it: <code bash> chmod +x /etc/network/if-pre-up.d/iptables </code>Please solve the following equation to prove you're human. 94 -5 = Please keep this field empty: SavePreviewCancel Edit summary Note: By editing this page you agree to license your content under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International