Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Tobias DiPasquale <codeslinger@gmail.com>
To: Charles Lewis <cjkjlewis@comcast.net>
Cc: netfilter@lists.netfilter.org
Subject: Re: Filter question
Date: Fri, 11 Feb 2005 15:17:09 -0500	[thread overview]
Message-ID: <876ef97a0502111217791ca9f4@mail.gmail.com> (raw)
In-Reply-To: <000801c51075$86cc9660$dd00a8c0@cpq>

On Fri, 11 Feb 2005 13:08:59 -0700, Charles Lewis <cjkjlewis@comcast.net> wrote:
> Hi all,
> 
> Have found tons of info on blocking a single ip address using iptables.
> 
> Can anyone suggest a place to find how-to ALLOW from single ip address (or
> block).
> 
> Using BusyBox & iptables 2.4.  Wanting to allow port 25 traffic from 2
> blocks & 1 explicit ONLY.

Set the policy on the chain to DROP and then add ACCEPT rules for the
IPs you want to allow. Example:

iptables -P INPUT DROP
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -s 1.1.1.1 -p tcp -m tcp --dport 25 -j ACCEPT
iptables -A INPUT -s 1.1.1.2 -p tcp -m tcp --dport 25 -j ACCEPT
...

You get the idea.

-- 
[ Tobias DiPasquale ]
0x636f6465736c696e67657240676d61696c2e636f6d


      reply	other threads:[~2005-02-11 20:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 20:08 Filter question Charles Lewis
2005-02-11 20:17 ` Tobias DiPasquale [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=876ef97a0502111217791ca9f4@mail.gmail.com \
    --to=codeslinger@gmail.com \
    --cc=cjkjlewis@comcast.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox