Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Ralf Spenneberg <lists@spenneberg.org>
To: ghancock@softeksoftware.com
Cc: Netfilter <netfilter@lists.netfilter.org>
Subject: Re: iptables question
Date: 14 Aug 2003 12:23:45 +0200	[thread overview]
Message-ID: <1060856625.1717.87.camel@kermit> (raw)
In-Reply-To: <1060807798.4082.8.camel@localhost.localdomain>

Am Mit, 2003-08-13 um 22.49 schrieb Glenn Hancock:
> I have my rules setup the way I would guess they should be based on 5
> tutorials, 1 book and the man pages.  However, I still can't seem to
> get the thing to do what I want.  Could someone please help me?
> 
> I will make this very simple:
Is this for a local machine?
> 1)  I want to allow all incoming requests to port 80
# Allow new connections to port 80
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT
> 2) I want to allow all outgoing requests .... period.
# Allow outgoing connections
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# Allow all packets belonging to established connections come back
iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT
> 
> 
> I want to drop all other incoming requests not addressed to port 80.
iptables -P INPUT DROP
iptables -P OUTPUT DROP

Cheers,

Ralf
-- 
Ralf Spenneberg
RHCE, RHCX

Book: Intrusion Detection für Linux Server   http://www.spenneberg.com
IPsec-Howto				     http://www.ipsec-howto.org
Honeynet Project Mirror:                     http://honeynet.spenneberg.org



  parent reply	other threads:[~2003-08-14 10:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-13 20:49 iptables question Glenn Hancock
2003-08-14 10:17 ` Chris Wilson
2003-08-14  6:53   ` Glenn Hancock
2003-08-14 10:23 ` Ralf Spenneberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-03-11 14:20 bossk
2008-03-11 18:46 ` Jan Engelhardt
2008-03-11 19:13   ` Justin Piszcz
2005-02-10 15:04 shardul Adhikari
2004-02-17 15:52 John Black
2004-02-17 16:40 ` Antony Stone
2003-09-08 16:43 iptables Question Elitesyntax
2003-02-03  6:47 IpTables question Curca Claudiu
2003-02-06  5:28 ` Joel Newkirk

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=1060856625.1717.87.camel@kermit \
    --to=lists@spenneberg.org \
    --cc=ghancock@softeksoftware.com \
    --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