From: Aleksandar Milivojevic <amilivojevic@pbl.ca>
To: it clown <suse@mailbox.co.za>
Cc: netfilter@lists.netfilter.org
Subject: Re: bind 9 and iptables
Date: Fri, 27 Aug 2004 15:37:07 -0500 [thread overview]
Message-ID: <412F9B73.9010603@pbl.ca> (raw)
In-Reply-To: <web-420408468@mail01.infosat.net>
it clown wrote:
> Hi All
>
> I have a dns with a forwarder to my isp on the iptables
> box. I am having trouble on getting dns to work properly.
[snip]
> I have tried the following with out any luck:
>
> iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT
> iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
> iptables -A INPUT -m state --state ESTABLISHED,RELATED -j
> ACCEPT
>
> what rule do i need to add to make things more secure to
> get my dns working properly, thanks?
By the above rules, you are not allowing your clients to connect to your
DNS server (you are only allowing DNS server to send queris outside).
What you need is:
iptables -A INPUT -m state --state ESTABLISHED
iptables -A INPUT -p icmp -m state --state RELATED
iptables -A INPUT -i int_if -p udp --sport 1024: --dport 53 \
-m state --state NEW -j ACCEPT
iptables -A INPUT -i int_if -p tcp --sport 1024: --dport 53 \
-m state --state NEW -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED
iptables -A OUTPUT -p icmp --m state --state RELATED
iptables -A OUTPUT -o ext_if -p udp --sport 1024: --dport 53 \
-m state --state NEW -j ACCEPT
iptables -A OUTPUT -o ext_if -p tcp --sport 1024: --dport 53 \
-m state --state NEW -j ACCEPT
Replace int_if and ext_if with internal and external interface names
(eth0, eth1, ppp0, or whatever else you have).
--
Aleksandar Milivojevic <amilivojevic@pbl.ca> Pollard Banknote Limited
Systems Administrator 1499 Buffalo Place
Tel: (204) 474-2323 ext 276 Winnipeg, MB R3T 1L7
next prev parent reply other threads:[~2004-08-27 20:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-27 20:06 bind 9 and iptables it clown
2004-08-27 20:19 ` Nick Taylor
2004-08-27 20:53 ` it clown
2004-08-27 21:02 ` Nick Taylor
2004-08-27 20:37 ` Aleksandar Milivojevic [this message]
2004-08-28 0:44 ` Nick Drage
2004-08-28 5:02 ` Aleksandar Milivojevic
-- strict thread matches above, loose matches on Subject: below --
2004-08-27 20:16 Jason Opperisano
2004-08-27 21:10 ` it clown
2004-08-27 21:00 Jason Opperisano
2004-08-27 21:19 Jason Opperisano
[not found] <D5C9032B2B09C64EA2409D6214E91AC90512F9@asimail2.alphanumeric.co m>
2004-08-27 23:32 ` it clown
[not found] ` <D5C9032B2B09C64EA2409D6214E91AC90512F9@asimail2.alphanumeric.com>
2004-08-28 0:47 ` Nick Drage
2004-08-28 1:58 ` Jose Maria Lopez
2004-08-28 4:40 ` dchemko
2004-08-27 23:34 Jason Opperisano
2004-08-28 0:00 ` it clown
2004-08-27 23:40 Daniel Chemko
2004-08-30 19:08 Jason Opperisano
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=412F9B73.9010603@pbl.ca \
--to=amilivojevic@pbl.ca \
--cc=netfilter@lists.netfilter.org \
--cc=suse@mailbox.co.za \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.