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:32:46 +0100	[thread overview]
Message-ID: <200404202132.46630.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <20040420202155.44738.qmail@web40503.mail.yahoo.com>

On Tuesday 20 April 2004 9:21 pm, Luis GUSTAVO wrote:

> but in this machine i have e-mail (25) and (110).

Thanks for mentioning that.

How about

iptables -A INPUT -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp --dport 100 -j ACCEPT

Regards,

Antony.

> Antony Stone <Antony@Soft-Solutions.co.uk> wrote:
>
> 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.

-- 
Microsoft may sell more software than any other company, but McDonald's sell 
more burgers than any other company, and I think the other similarities are 
obvious...

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



  reply	other threads:[~2004-04-20 20:32 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
2004-04-20 20:21   ` Luis GUSTAVO
2004-04-20 20:32     ` Antony Stone [this message]
     [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=200404202132.46630.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