From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: Netfilter-List <netfilter@lists.netfilter.org>
Subject: Re: MAC address and iptables
Date: Sun, 29 Feb 2004 15:55:02 +0000 [thread overview]
Message-ID: <200402291555.02977.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <404207E3.6060602@stupar.homelinux.net>
On Sunday 29 February 2004 3:40 pm, Sasa Stupar wrote:
> The thing is that it worked but it was not I have expected. Her is my
> ruleset:
> -----------------
> # Generated by webmin
> *filter
>
> :FORWARD ACCEPT [0:0]
> :OUTPUT ACCEPT [0:0]
> :INPUT DROP [0:0]
So, you have a default DROP policy on INPUT - good.
> # Loopback
> -A OUTPUT -o lo -j ACCEPT
> # Allow self access by loopback interface
> -A INPUT -i lo -j ACCEPT
> # Master
> -A INPUT -m mac -s a.b.c.d --mac aa:bb:cc:dd:ee:ff -j ACCEPT
That rule will accept all connections from one IP address with the correct MAC
address.
> # Accept established connections
> -A INPUT -m state -i eth0 --state ESTABLISHED,RELATED -j ACCEPT
That will allow reply packets to all your outbound connections.
> -A INPUT -p tcp -m tcp ! --tcp-option 2 -j REJECT --reject-with tcp-reset
Reject any TCP packets not already matched, which don't have TCP option 2 set.
> # FTP
> -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
Accept FTP connections (from anywhere)
> # Telnet
> -A INPUT -p tcp -m tcp --dport 23 -j ACCEPT
Accept telnet (yuk) connections from anywhere
> # SMTP
> -A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
Accept smtp connections from anywhere......
I have skipped the rest of your rules, which look pretty similar to the last
three above, but for different services. They all look sensible to me.
So, what is the problem you are experiencing? What is happening which you
don't want, or what is not happening which you do want?
Regards,
Antony.
--
What makes you think I know what I'm talking about?
I just have more O'Reilly books than most people.
Please reply to the list;
please don't CC me.
next prev parent reply other threads:[~2004-02-29 15:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-29 13:45 MAC addres and iptables Sasa Stupar
2004-02-29 13:55 ` Antony Stone
2004-02-29 14:06 ` Sasa Stupar
2004-02-29 14:14 ` MAC address " Antony Stone
2004-02-29 14:38 ` MAC addres " Sasa Stupar
2004-02-29 15:12 ` MAC address " Antony Stone
2004-02-29 15:40 ` Sasa Stupar
2004-02-29 15:55 ` Antony Stone [this message]
2004-02-29 16:02 ` Sasa Stupar
2004-02-29 16:14 ` David Cannings
2004-02-29 16:16 ` Antony Stone
2004-02-29 18:10 ` Sasa Stupar
2004-02-29 21:44 ` Sasa Stupar
2004-02-29 22:03 ` Antony Stone
2004-03-01 6:27 ` Sasa Stupar
2004-03-01 6:42 ` Sasa Stupar
2004-03-01 9:34 ` Sasa Stupar
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=200402291555.02977.Antony@Soft-Solutions.co.uk \
--to=antony@soft-solutions.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox