LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-22-2005, 06:54 AM   #1
raja1979
LQ Newbie
 
Registered: Dec 2005
Posts: 15

Rep: Reputation: 0
Layer 2 Filtering


I want to filter the Packets at layer 2 , can any one tell me weather it is possible using Iptables ,

Or PLease Tell me how it is possible.
 
Old 12-22-2005, 08:23 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
iptables can be used to filter packets based on MAC addresses.
 
Old 12-24-2005, 12:25 AM   #3
raja1979
LQ Newbie
 
Registered: Dec 2005
Posts: 15

Original Poster
Rep: Reputation: 0
The Packets which i am getting only contain Ethernet header (Source MAc , Dest Mac , Protocol) , i have tried using Iptables but it does not filters the packets .
i think iptables works on layer 3 .

Please Suggest me some answers
 
Old 12-24-2005, 12:35 AM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Actually, though intended for ethernet bridging, it seems the ebtables interface should do what you need.
 
Old 12-24-2005, 03:14 AM   #5
enthusiast_abdul
LQ Newbie
 
Registered: Oct 2005
Location: India
Distribution: Redhat 9.0
Posts: 20

Rep: Reputation: 0
u can't do it using IP tables. they work at L3. why don't you write a simple ethernet bridge for this purpose.
 
Old 12-25-2005, 09:47 AM   #6
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
I could be mistaken here, but I always thought MAC addresses could be specified using iptables just so long as your kernel is compiled with CONFIG_IP_NF_MATCH_MAC support.
 
  


Reply



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
DVD Drives - Dual Layer or double layer? Groundhog1248 Linux - Hardware 2 09-23-2009 09:30 PM
Connecting on Layer 2, not Layer 3!!!! mattp Linux - Wireless Networking 3 11-29-2005 10:55 AM
Dual Layer ISO onto 2 Single Layer Medias iammike SUSE / openSUSE 3 05-11-2005 05:15 PM
Keybord layer Getafix Linux - Newbie 0 10-11-2004 08:28 AM
Sendmail Spam filtering and Virus filtering MrJoshua Linux - General 2 04-03-2003 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:14 AM.

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