Iptables, invalid argument, problem with modprobe
I want to lock certain IP to a MAC address and I tried that:
iptables -t nat -A POSTROUTING -s 1.2.3.4 -m mac --mac-source aa:bb:cc:dd -j SNAT --to-source 192.168.1.2 iptables -t nat -A POSTROUTING -s 1.2.3.4 -j DROP But after the first line I got: iptables: Invalid argument Here is what I got from lsmod (hm.. I know mac match support is compiled into the kernel): Code:
Module Size Used by Not tainted Code:
# locate ipt |grep mac modprobe libipt_mac modprobe ipt_mac , but always got modprobe: Can't locate module... And one more thing: I'm using source-compiled version of iptables: v1.3.0rc1 Where could be the problem in that setup? |
The problem is solved. The mac match doesn't work in POSTROUTING, but in PREROUTING, so I put it there with target ACCEPT. Then added different rule for SNAT. So that was.
|
All times are GMT -5. The time now is 11:26 AM. |