【发布时间】:2015-12-04 09:21:28
【问题描述】:
我正在尝试创建 iptables 并将其标记为 ip 规则。 标记不起作用。
# ip rule
0: from all lookup local
32762: from all fwmark 0x2 lookup rteth4
32763: from all fwmark 0x1 lookup rteth4
32764: from all to 93.xxx.xxx.xxx lookup rteth4
32765: from 93.xxx.xxx.xxx lookup rteth4
32766: from all lookup main
32767: from all lookup default
# iptables -A INPUT -j MARK --set-mark 2
# iptables-save > /etc/network/iptables.up.rules
# iptables-apply
# iptables -L INPUT --line-number
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 MARK all -- anywhere anywhere MARK set 0x2
如何应用这个:iptables -L INPUT --line-number 使用表 rteth4? 以及如何创建匹配 localhost:port 请求的 iptables 命令?
谢谢
【问题讨论】: