linux
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| linux [2026/04/26 13:33] – nine | linux [2026/04/26 13:41] (current) – [iptables/netfilter] nine | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| ===== iptables/ | ===== iptables/ | ||
| + | |||
| Restrict to single host, e.g. for prometheus node exporter | Restrict to single host, e.g. for prometheus node exporter | ||
| + | # required for persisting rules | ||
| + | apt-get install iptables-persistent | ||
| + | | ||
| + | # set rules | ||
| iptables -N prometheus | iptables -N prometheus | ||
| iptables -A prometheus --src < | iptables -A prometheus --src < | ||
| Line 15: | Line 20: | ||
| iptables -I INPUT -m tcp -p tcp --dport 9100 -j prometheus | iptables -I INPUT -m tcp -p tcp --dport 9100 -j prometheus | ||
| | | ||
| + | # save persistent | ||
| + | iptables-save | tee / | ||
| + | |||
| ===== docker ===== | ===== docker ===== | ||
linux.txt · Last modified: 2026/04/26 13:41 by nine