public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  OT: iptables mac filtering
@ 2006-08-09 18:54 James
  2006-08-09 19:16 ` Daniel Iliev
  2006-08-09 19:43 ` Hans-Werner Hilse
  0 siblings, 2 replies; 7+ messages in thread
From: James @ 2006-08-09 18:54 UTC (permalink / raw
  To: gentoo-user

Hello,

Continuing my quest for iptables enlightenment....I have a question
about 'mac address' syntax. All options for mac and arp have been compiled
into a gentoo-hardened kernel.

I'm using variations of this  syntax in my script.

# Rule to only allow ssh by MAC address 
iptables -A INPUT -i eth0 -p tcp -m mac --mac-source xx:xx:xx:xx:xx:xx \
   --source-port 1024:65535 -d <ip.address> --dport 22 -j ACCEPT

Where  the mac address xx...xx is the system allowed in, via ssh
and the ip.address is that of the destination (/24 based) host
The rule works well  when packets have to traverse
a firewall/router as mac addresses do not get propagated (I think).

However, when I use  similar syntax to prevent a system on the same
local (ethernet) segment from being able to ssh into a local system, 
it does prevent ssh access, as expected. Granted MAC addresses
can be foiled, especially on the same segment, but how do I make this
rule work?: On a local segemnt how would I modify the syntax so 
that only a select machine (maybe IP + MAC) could access a host,
running iptables, via ssh?

thoughts and ideas are most welcome.

James





-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-08-12  2:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-09 18:54 [gentoo-user] OT: iptables mac filtering James
2006-08-09 19:16 ` Daniel Iliev
2006-08-09 19:43 ` Hans-Werner Hilse
     [not found]   ` <loom.20060811T003230-539@post.gmane.org>
2006-08-11  7:24     ` [gentoo-user] " Richard Fish
2006-08-11 21:39       ` James
2006-08-11 22:20         ` Richard Fish
2006-08-12  2:02           ` James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox