public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alon Bar-Lev <alonbl@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] workstation iptables
Date: Wed, 7 Oct 2015 21:22:24 +0300	[thread overview]
Message-ID: <CAOazyz0rt6RGLj5YZZ_gp5RDzh1ZM93ag0K9Hph5qrHg7LJZ+Q@mail.gmail.com> (raw)
In-Reply-To: <loom.20151006T210434-749@post.gmane.org>

On 6 October 2015 at 22:14, James <wireless@tampabay.rr.com> wrote:
>
> Hello,
>
> I just ran across this page:
>
> http://gentoo-en.vfose.ru/wiki/Iptables/Iptables_and_stateful_firewalls#State_basics
>
> It has a basic firewall using iptables.
> Not bad for a generic firewall on a openrc workstation.
> What is the best way to auto lauch this sort of firewall.sh ?
>
> Any improvements in this basic workstation firewall
> everything out, nothing in?
> A simple rule for ssh in only from the local lan
> (use 192.168.100.100 for example rule(s).
>
>

Hi,

I suggest you look into firehol package.
It creates iptables rules out of human readable policy.

Regards,
Alon

> ...................................
> firewall.sh
> ...................................
> #!/bin/bash
> # A basic stateful firewall for a workstation or laptop that isn't running any
> # network services like a web server, SMTP server, ftp server, etc.
>
> if [ "$1" = "start" ]
> then
>         echo "Starting firewall..."
>         iptables -P INPUT DROP
>         iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
> elif [ "$1" = "stop" ]
> then
>         echo "Stopping firewall..."
>         iptables -F INPUT
>         iptables -P INPUT ACCEPT
> fi
> ............................
>
> just launched manually as a script.
>
>
> Any good tools to quickly test this firewall from another local workstation?
>
>
> wwr,
> James
>
>


      parent reply	other threads:[~2015-10-07 18:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 19:14 [gentoo-user] workstation iptables James
2015-10-07  5:46 ` Mick
2015-10-07 13:23   ` [gentoo-user] " James
2015-10-07 20:41     ` Mick
2015-10-07 18:20 ` [gentoo-user] " Tom H
2015-10-07 18:22 ` Alon Bar-Lev [this message]

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=CAOazyz0rt6RGLj5YZZ_gp5RDzh1ZM93ag0K9Hph5qrHg7LJZ+Q@mail.gmail.com \
    --to=alonbl@gentoo.org \
    --cc=gentoo-user@lists.gentoo.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