Networking Forums

Networking Forums > Computer Networking > Linux Networking > iptables: mac-source and FORWARD

Reply
Thread Tools Display Modes

iptables: mac-source and FORWARD

 
 
zacWonder
Guest
Posts: n/a

 
      11-28-2003, 04:01 AM
Hi!
i'm using iptables v.1.2.2. i have a problem with forward chain
it looks like this:
iptables -N check_mac
iptables -A check_mac -m mac --mac-source xx : xx : xx : xx : xx : xx -s
192.168.0.1 -j RETURN
iptables -A check_mac -m mac --mac-source xx : xx : xx : xx : xx : xx -s
192.168.0.2 -j RETURN
iptables -A check_mac -m mac --mac-source xx : xx : xx : xx : xx : xx -s
192.168.0.3 -j RETURN
....
iptables -A check_mac -j DROP

iptables -A FORWARD -i eth1 -j check_mac
....

So i only want specific ip with specific mac address pairs to be forwarded,
but it doesn't work! If i place RETURN target instead of DROP in the last
line of check_mac chain it works. But of course that's not the way i want it
to work.
Anybody any idea?




 
Reply With Quote
 
 
 
 
Horst Knobloch
Guest
Posts: n/a

 
      11-28-2003, 03:14 PM
zacWonder <(E-Mail Removed)> wrote:

> i'm using iptables v.1.2.2. i have a problem with forward chain
> it looks like this:
> iptables -N check_mac
> iptables -A check_mac -m mac --mac-source xx : xx : xx : xx : xx : xx -s
> 192.168.0.1 -j RETURN
> iptables -A check_mac -m mac --mac-source xx : xx : xx : xx : xx : xx -s
> 192.168.0.2 -j RETURN
> iptables -A check_mac -m mac --mac-source xx : xx : xx : xx : xx : xx -s
> 192.168.0.3 -j RETURN


Have you checked that the source mac addresses really match the
respective IP addresses? Did you specify the MAC addresses in
the propper syntax (xx:xx:xx:xx:xx:xx)?

Use a log rule before the next DROP-rule to make clear what is
dropped.

> ...
> iptables -A check_mac -j DROP
>
> iptables -A FORWARD -i eth1 -j check_mac
> ...


Also use ethereal or tcpdump to check what is coming in
on eth1.


Ciao, Horst
--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables port forward question Ken Williams Linux Networking 2 07-21-2006 08:55 PM
need help on port forward using iptables. jsuthan Linux Networking 7 01-21-2006 01:53 AM
Looking for iptables applications code (iptables.c) to run some rules to forward packets tvnaidu@yahoo.com Linux Networking 2 01-17-2005 05:01 PM
iptables - url forward soraya soch Linux Networking 0 11-02-2003 09:40 AM
PLEASE HELP - trying to forward web traffic through firewall w/IPTABLES Justin Morgan Linux Networking 2 08-18-2003 09:24 AM



1 2 3 4 5 6 7 8 9 10 11