From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: netfilter@lists.netfilter.org
Subject: Re: allow / deny clients
Date: Sat, 30 Apr 2005 17:33:55 -0500 [thread overview]
Message-ID: <427407D3.40805@riverviewtech.net> (raw)
In-Reply-To: <853706858e33.858e33853706@vsnl.net>
> I would like to allow / deny access to the net to clients
> based on :
>
> 1. client IPs.
>
> or
>
> 2. client IP + MAC
Rather than denying based on IP, especially in a DHCP environment where IPs could change, I would deny based on source MAC address. You would write a rule like this:
iptables -t filter -A FORWARD -o eth0 -m mac --mac-source 01:23:45:67:89:ab -j ACCEPT
This rule will allow the system with the mack address of 01:23:45:67:89:ab to access the internet. I would probably recommend that you add some filters to check that the destination IP and possibly port are valid. To do this you might want to jump to another chain to do the checking for you or have all traffic pass through that chain before hand.
iptables -t filter -A FORWARD -o eth0 -m mac --mac-source 01:23:45:67:89:ab -j DstIPandPortCheck
This would be such a rule to jump to the DstIPandPortCheck chain to do any additional validation.
Grant. . . .
prev parent reply other threads:[~2005-04-30 22:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-30 5:33 allow / deny clients varun_saa
2005-04-30 22:33 ` Taylor, Grant [this message]
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=427407D3.40805@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--cc=netfilter@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.