public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: James <wireless@tampabay.rr.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user]  OT: iptables mac filtering
Date: Wed, 9 Aug 2006 18:54:45 +0000 (UTC)	[thread overview]
Message-ID: <loom.20060809T191535-468@post.gmane.org> (raw)

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



             reply	other threads:[~2006-08-09 19:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09 18:54 James [this message]
2006-08-09 19:16 ` [gentoo-user] OT: iptables mac filtering 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20060809T191535-468@post.gmane.org \
    --to=wireless@tampabay.rr.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox