public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Hans-Werner Hilse <hilse@web.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user]  OT: iptables mac filtering
Date: Wed, 9 Aug 2006 21:43:53 +0200	[thread overview]
Message-ID: <20060809214353.5787529e.hilse@web.de> (raw)
In-Reply-To: <loom.20060809T191535-468@post.gmane.org>

Hi,

On Wed, 9 Aug 2006 18:54:45 +0000 (UTC)
James <wireless@tampabay.rr.com> wrote:

> 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).

No, of course not. The incoming packet will have the MAC of the router
instead. Only ethernet frames carry a MAC, so there's no MAC in IP
tunnels, too.

> 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?

Hm, by adding "-s <source IP>"? And of course, you need to change
INPUT's policy to REJECT or DROP, using iptables -P INPUT DROP. Note
that you probably want some rules allowing traffic local on that
machine, so also allow packets coming from "lo".

But you already mentioned it: There's not much point in blocking access
this way since MAC addresses can as well be spoofed as IP addresses.
Are you suffering from DOS attacks on your SSH server?

-hwh
-- 
gentoo-user@gentoo.org mailing list



  parent reply	other threads:[~2006-08-09 20:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [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=20060809214353.5787529e.hilse@web.de \
    --to=hilse@web.de \
    --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