From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?q?Luis=20GUSTAVO?= Subject: Re: script firewall Date: Tue, 20 Apr 2004 17:21:55 -0300 (ART) Sender: netfilter-admin@lists.netfilter.org Message-ID: <20040420202155.44738.qmail@web40503.mail.yahoo.com> References: <200404202110.48904.Antony@Soft-Solutions.co.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1055801671-1082492515=:43745" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <200404202110.48904.Antony@Soft-Solutions.co.uk> Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org --0-1055801671-1082492515=:43745 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable but in this machine i have e-mail (25) and (110). =20 Antony Stone wrote: On Tuesday 20 April 2004 8:53 pm, Luis GUSTAVO wrote: > I=B4m 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 wonde= r=20 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 did= n't=20 understand from your requirements. Regards, Antony. --=20 Most people have more than the average number of legs. Please reply to the list; please don't CC me. Luis GUSTAVO lgpcf@yahoo.com.br +55 (21) 9891-3560 http://skafe.sites.uol.com.br ---------------------------------------------------------------------------= ------ =20 --------------------------------- Yahoo! Messenger - Fale com seus amigos online. Instale agora! --0-1055801671-1082492515=:43745 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
but in this machine i have e-mail (25) and (110).
 


Antony Stone <Antony@Soft-Solutions.co.uk>= wrote:
On Tuesday 20 April 2004 8:53 pm, Luis GUSTAV= O wrote:

> I=B4m looking for a firewall script, for my ADSL conec= tion, and share
> my conection.
>
> And i want block port= s 1024:65535

I assume you mean you want to block *incoming* ports (i= n which case I wonder
why you only want to block above 1023), so how ab= out this:

iptables -P INPUT DROP
iptables -P FORWARD DROP
ipta= bles -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables = -A FORWARD -i $int_IF -o $ext_IF -j ACCEPT
iptables -A POSTROUTING -t na= t -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 t= he ave rage number of legs.

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



Luis GUSTAVO        = lgpcf@yahoo.com.br
+55 (21) 9891-3560  =   http://skafe.sites.uol.com.br
------------------= ---------------------------------------------------------------
 



Ya= hoo! Messenger - Fale com seus amigos online. Ins= tale agora! --0-1055801671-1082492515=:43745--