Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: script firewall
Date: Tue, 20 Apr 2004 21:10:48 +0100	[thread overview]
Message-ID: <200404202110.48904.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <20040420195318.81826.qmail@web40514.mail.yahoo.com>

On Tuesday 20 April 2004 8:53 pm, Luis GUSTAVO wrote:

> I´m looking for a firewall script, for my ADSL conection, and share
> my conection.
>
> And i want block ports 1024:65535

I assume you mean you want to block *incoming* ports (in which case I wonder 
why you only want to block above 1023), so how about this:

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $int_IF -o $ext_IF -j ACCEPT
iptables -A POSTROUTING -t nat -o $ext_IF -j MASQUERADE

Let us know if you have any problems with it, or if there is anything I didn't 
understand from your requirements.

Regards,

Antony.

-- 
Most people have more than the average number of legs.

                                                     Please reply to the list;
                                                           please don't CC me.



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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-20 19:53 script firewall Luis GUSTAVO
2004-04-20 20:10 ` Antony Stone [this message]
2004-04-20 20:21   ` Luis GUSTAVO
2004-04-20 20:32     ` Antony Stone
     [not found] <20040414025241.57105.qmail@web40509.mail.yahoo.com>
2004-04-14  8:30 ` Antony Stone
  -- strict thread matches above, loose matches on Subject: below --
2004-04-13 21:28 Luis GUSTAVO
2004-04-13 22:02 ` Antony Stone

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=200404202110.48904.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