Linux Netfilter discussions
 help / color / mirror / Atom feed
* Filter question
@ 2005-02-11 20:08 Charles Lewis
  2005-02-11 20:17 ` Tobias DiPasquale
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Lewis @ 2005-02-11 20:08 UTC (permalink / raw)
  To: netfilter

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.

Thanks in advance!
Clewis
Pueblo, CO



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Filter question
  2005-02-11 20:08 Filter question Charles Lewis
@ 2005-02-11 20:17 ` Tobias DiPasquale
  0 siblings, 0 replies; 2+ messages in thread
From: Tobias DiPasquale @ 2005-02-11 20:17 UTC (permalink / raw)
  To: Charles Lewis; +Cc: netfilter

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-11 20:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-11 20:08 Filter question Charles Lewis
2005-02-11 20:17 ` Tobias DiPasquale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox