From: Andrew Beverley <andy@andybev.com>
To: Harry Putnam <reader@newsguy.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Starter iptables scripts
Date: Thu, 05 May 2011 00:19:28 +0100 [thread overview]
Message-ID: <1304551168.32212.36.camel@andybev-desktop> (raw)
In-Reply-To: <8762pqax4j.fsf@newsguy.com>
On Wed, 2011-05-04 at 18:01 -0500, Harry Putnam wrote:
> Setup: Running Gentoo Linux
> Iptables and many related parts compiled into kernel
>
> Can anyone offer well used and vouched for URLs to iptables scripts
> for a starter firewall setup?
>
There's plenty of stuff out there if you Google, but if you tell us
exactly what you want to achieve then we will suggest something.
A good starting point for a basic firewall is to block all incoming
unrelated requests, but let everything out. Not particularly
comprehensive, but it may suit your needs:
iptables -A INPUT -i $ext_IF -m state \
--state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i $ext_IF -j DROP
You may also want to do FORWARD if you use this as a gateway:
iptables -A FORWARD -i $ext_IF -m state \
--state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $ext_IF -j DROP
Andy
next prev parent reply other threads:[~2011-05-04 23:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 23:01 Starter iptables scripts Harry Putnam
2011-05-04 23:19 ` Andrew Beverley [this message]
2011-05-04 23:41 ` Jan Engelhardt
2011-05-05 6:03 ` Andrew Beverley
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=1304551168.32212.36.camel@andybev-desktop \
--to=andy@andybev.com \
--cc=netfilter@vger.kernel.org \
--cc=reader@newsguy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox