All of lore.kernel.org
 help / color / mirror / Atom feed
From: kate <kate7234@yahoo.com>
To: Jason Opperisano <opie@817west.com>, netfilter@lists.netfilter.org
Subject: Re: services for predetermined IP addresses
Date: Fri, 15 Oct 2004 13:14:13 -0700 (PDT)	[thread overview]
Message-ID: <20041015201413.71441.qmail@web21527.mail.yahoo.com> (raw)
In-Reply-To: <20041015200157.GA7982@bender.817west.com>


--- Jason Opperisano <opie@817west.com> wrote:

> On Fri, Oct 15, 2004 at 12:41:15PM -0700, kate
> wrote:
> > Hello,
> > 
> > As I see increased scans on my IP address, I want
> to
> > limit access to only predetermined IP address
> ranges
> > for certain services - Is the following the
> correct
> > way to do this?
> > 
> > <snip>
> > # (Part A) Rules for incoming packets from
> Internet
> > # Packets for established connections
> > iptables -A INPUT -p ALL -d $ETH0_IP -m state
> --state
> > ESTABLISHED,RELATED -j ACCEPT
> 
> stylistic note:  the "-p ALL" is kinda
> unnecessary...
> 
> > # (Part B) TCP Rules
> > iptables -A INPUT -p TCP -i eth0 -s 123.45.1.1
> > --destination-port 21 -j okay # userA
> > iptables -A INPUT -p TCP -i eth0 -s 123.45.0/16
> > --destination-port 22 -j okay  #users A - Z
> 
> i think you're missing a "0" there:  123.45.0/16
> should really be
> 123.45.0.0/16.
> 
> > </snip>
> > 
> > So I understand -
> > ONLY User A can ftp, and all those in 123.45. can
> ssh
> > , BUT no-one else on the Internet can request
> services
> > ?
> 
> yes--as along as somewhere further down the chain
> you hit a drop-all
> rule of some sort...

Yes, I see that now...
# (Part B) TCP Rules
iptables -A INPUT -p TCP -i eth0 -s 123.45.1.1
--destination-port 21 -j okay # userA
iptables -A INPUT -p TCP -i eth0 -s 123.45.0.0/16
--destination-port 22 -j okay  #users A - Z

so the drop-all would be..?

iptables -A INPUT -p TCP -i eth0 -s 0/0 -j DROP

or did I just invent my own thing here?
tia
Kate


		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


  reply	other threads:[~2004-10-15 20:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15 19:41 services for predetermined IP addresses kate
2004-10-15 20:01 ` Jason Opperisano
2004-10-15 20:14   ` kate [this message]
2004-10-15 20:28     ` Jason Opperisano
2004-10-15 20:40       ` kate
2004-10-15 21:03         ` Jason Opperisano
  -- strict thread matches above, loose matches on Subject: below --
2004-10-15 20:25 Daniel Chemko
2004-10-16 17:52 ` Jose Maria Lopez

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=20041015201413.71441.qmail@web21527.mail.yahoo.com \
    --to=kate7234@yahoo.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=opie@817west.com \
    /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.