我想把一个公网I.P SNAT给一个PC根据它的MAC.地址。--- 印刷
iptables -t nat -I POSTROUTING -o eth.0 -m mac --mac-source 00:08:0.2:93:35:A5 -j SNAT --to 229..216.292.216.
但是 MAC match不能用于.POSTROUTING。因此.报错.
iptables:. Target problem.
于是我想换个方式:
先用mark来设置mark值
iptables -.t mangle -I FORWA.RD -o eth0 -m mac --mac-sou.rce 00:08:02:93:35:A5 -j MARK --set-mark 111.
这句没有问题。
然后根据mark值来进行.SNAT。报错如下:服务器
iptables -t nat -I POST.ROUTING .-o eth0 -j SNAT --to 229.216.292..216 -m --mark 111教育
iptables v1.2.8: Cou.ldn't load match `--mark':/usr/lib/iptables/libipt._--mark.so: canno.t open shared object file: No such file o.r directory--------------彩票
Try `iptabl.es -h' or 'iptables --.help' for more information.虚拟主机
帮我看看错在什么地方?
各位有什么好主意?
谢谢!!!