💾 Archived View for freeshell.de › tldr › iptables.gmi captured on 2023-06-16 at 19:03:20. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
Program that allows configuration of tables, chains and rules provided by the Linux kernel firewall.
sudo iptables -vnL
sudo iptables -P {chain} {rule}
sudo iptables -A {chain} -s {ip} -j {rule}
sudo iptables -A {chain} -s {ip} -p {protocol} --dport {port} -j {rule}
sudo iptables -t {nat} -A {POSTROUTING} -s {192.168.0.0/24} -j {MASQUERADE}
sudo iptables -D {chain} {rule_line_number}
sudo iptables-save -t {tablename} > {path/to/iptables_file}
sudo iptables-restore < {path/to/iptables_file}
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).