From: Shri Shrikumar <shri@urbyte.com>
To: netfilter@lists.netfilter.org
Subject: Help setting up a firewall on a machine
Date: Fri, 16 May 2003 12:30:26 +0100 [thread overview]
Message-ID: <3EC4CBD2.9000004@urbyte.com> (raw)
Hi,
I am just configuring a machine and would like to setup a firewall on it
using iptables. I am keen on setting up properly on the first go since I
dont want to be left with a machine that I cant ssh into.
The machine has just one nic eth0 which is connected to the net. There
is not NAT or MASQ to be done
Here is what I have so far.
/sbin/iptables -N block
/sbin/iptables -A block -p ICMP -j ACCEPT
/sbin/iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A block -j DROP
/sbin/iptables -A INPUT -j block
/sbin/iptables -A FORWARD -j block
What rules do I need to add to the block chain to allow any new
connections from machine to the outside world ? would it just be
/sbin/iptables -A block -m state --state NEW -o eth0 -j ACCEPT
I am also going to be hosting a site, so the following rule will be
added as well,
/sbin/iptables -I block -p tcp --dport 80 -j ACCEPT
Do these rules sound about right ?
Thanks and regards,
Shri
--
------------------------------------------------------------------------
Shri Shrikumar U R Byte Solutions Tel: 0845 644 4745
I.T. Consultant Edinburgh, Scotland Mob: 0773 980 3499
Web: www.urbyte.com Email: shri@urbyte.com
next reply other threads:[~2003-05-16 11:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-16 11:30 Shri Shrikumar [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-05-15 11:35 Help setting up a firewall on a machine Shri Shrikumar
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=3EC4CBD2.9000004@urbyte.com \
--to=shri@urbyte.com \
--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