Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-10-2005, 04:50 PM   #1
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 31
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 -m mac --mac-source aa:bb:cc:dd -j SNAT --to-source
iptables -t nat -A POSTROUTING -s -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):
Module                  Size  Used by    Not tainted
ipt_REDIRECT             696   1  (autoclean)
8139too                16040   2 
mii                     2368   0  [8139too]
And here is what locate gave me:
# locate ipt |grep mac
I tried to load a module:
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?
Old 05-11-2005, 06:55 AM   #2
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Original Poster
Rep: Reputation: 31
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crypto problem: LOOP_SET_STATUS: Invalid argument Slacker0815 Slackware 7 07-21-2005 06:13 PM
tc qdisc Invalid argument problem 4mix Linux - Networking 1 09-09-2004 05:26 PM
Problem assigning class D IPADDR because of SIOCIFADDR: Invalid argument clu Slackware 3 02-01-2004 08:06 AM
Dante sockd problem - Invalid argument (errno = 22) Sammy2ooo Linux - Networking 1 11-19-2003 08:22 AM
[ Invalid Argument on 'iptables' ] benleung Linux - Security 1 09-23-2003 01:25 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:36 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration