iptables
Differences
This shows you the differences between two versions of the page.
| iptables [2020/11/22 09:30] – created A User Not Logged in | iptables [2023/06/22 05:07] (current) – 2406:da18:864:f101:4d58:28e8:644:2ed5 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | < | + | allow forward for specific in/out interface: |
| - | iptables [-t TABLE] [-COMMAND CHAIN] [RULE] | + | |
| - | </code> | + | |
| - | Tables and chains: | + | iptables -I FORWARD --in-interface < |
| - | * filter (default table if -t option is not specified) | ||
| - | * INPUT | ||
| - | * FORWARD | ||
| - | * OUTPUT | ||
| - | * nat | ||
| - | * PREROUTING | ||
| - | * OUTPUT | ||
| - | * POSTROUTING | ||
| - | * mangle | ||
| - | * PREROUTING | ||
| - | * OUTPUT | ||
| - | * INPUT | ||
| - | * FORWARD | ||
| - | * POSTROUTING | ||
| - | * raw | ||
| - | * PREROUTING | ||
| - | * OUTPUT | ||
| - | Command: | + | ====== mangle table ====== |
| - | * -A: append | + | mark packet: |
| - | * -D: delete | + | |
| - | * -I | + | |
| - | * -R | + | |
| - | * -L: list | + | |
| - | * -F | + | |
| - | * -Z | + | |
| - | * -N | + | |
| - | * -X | + | |
| - | * -P | + | |
| - | * -E | + | |
| - | Rule specification(used | + | iptables -t mangle -I PREROUTING --in-interface < |
| + | |||
| + | |||
| + | ====== nat table ====== | ||
| - | * -p, --protocol [!] protocol | + | postrouting masquerade: |
| - | * -s, --source [!] address[/ | + | |
| - | * -d, --destination [!] address[/ | + | |
| - | * -j, --jump target | + | |
| - | * -g, --goto chain | + | |
| - | * -i, --in-interface [!] name | + | |
| - | * -o, --out-interface [!] name | + | |
| - | * -c, --set-counters PKTS BYTES | + | |
| - | * -v, --verbose | + | |
| - | * -n, --numeric | + | |
| - | * -x, --exact | + | |
| - | * --line-numbers | + | |
| - | * --modprobe=command | + | |
| - | Target: | + | iptables -t nat -I POSTROUTING --out-interface < |
| + | | ||
| + | prerouting masquerade: | ||
| + | iptables -t nat -I PREROUTING --in-interface < | ||
| - | ====== IP Forwarding ====== | ||
iptables.1606037416.txt.gz · Last modified: by A User Not Logged in
