linux:iptables
差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
linux:iptables [2017/08/20 01:49] – Update options and rules section memory | linux:iptables [2023/12/03 02:24] (当前版本) – 外部编辑 127.0.0.1 | ||
---|---|---|---|
行 1: | 行 1: | ||
====== iptables ====== | ====== iptables ====== | ||
+ | |||
+ | {{user: | ||
+ | |||
+ | 图片来源:[[https:// | ||
===== Usage ===== | ===== Usage ===== | ||
行 53: | 行 57: | ||
iptables -A INPUT -j DROP | iptables -A INPUT -j DROP | ||
+ | ===== Router ===== | ||
+ | |||
+ | Redirect all dns query to specified ip: | ||
+ | |||
+ | iptables -t nat -A PREROUTING -p udp -s 192.168.1.0/ | ||
+ | |||
+ | Redirect all dns query to specified ip except some ip: | ||
+ | |||
+ | iptables -t nat -A PREROUTING -p udp -s 192.168.1.24 -j ACCEPT | ||
+ | iptables -t nat -A PREROUTING -p udp -s 192.168.1.0/ | ||
+ | |||
+ | |||
+ | ===== Reference ===== | ||
+ | |||
+ | * [[https:// |
linux/iptables.1503193755.txt.gz · 最后更改: (外部编辑)