All of lore.kernel.org
 help / color / mirror / Atom feed
* DNS rules
@ 2005-05-01  9:33 varun_saa
  2005-05-01  9:52 ` Askar
  0 siblings, 1 reply; 5+ messages in thread
From: varun_saa @ 2005-05-01  9:33 UTC (permalink / raw)
  To: netfilter

Hello,
     My server is on Mandriva 10.1
eth0 is WAN with static IP connected to 512K DSL
eth1 is LAN - 192.168.0.0/24 and 192.168.21.0/24

I have 2 DNS provided by the ISP.

Is it usefull to have rules for DNS included
in the iptables ?

Thanks

Varun




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DNS rules
  2005-05-01  9:33 varun_saa
@ 2005-05-01  9:52 ` Askar
  0 siblings, 0 replies; 5+ messages in thread
From: Askar @ 2005-05-01  9:52 UTC (permalink / raw)
  To: varun_saa@vsnl.net; +Cc: netfilter

Again it depends, how you setup your default policies. In case you are
using recommended "default DROP" then you have to tell iptables to
allow "udp 53" towards your ISP.

iptables -A FORWARD -p udp --dport 53 -j ACCEPT


If you are running a small LAN then running a cache only dns on your
gateway would be beneficial, (that it will cache the lookups)

dnsmasq is excellent cache only dns server and i'm sure you would get
is running within 10 minutes.
you can also use bind in cache only mode.

regards

Askar Ali
On 5/1/05, varun_saa@vsnl.net <varun_saa@vsnl.net> wrote:
> Hello,
>      My server is on Mandriva 10.1
> eth0 is WAN with static IP connected to 512K DSL
> eth1 is LAN - 192.168.0.0/24 and 192.168.21.0/24
> 
> I have 2 DNS provided by the ISP.
> 
> Is it usefull to have rules for DNS included
> in the iptables ?
> 
> Thanks
> 
> Varun
> 
> 


-- 
I love deadlines. I like the whooshing sound they make as they fly by.
Douglas Adams


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DNS rules
       [not found] <915b3891601a.91601a915b38@vsnl.net>
@ 2005-05-01 10:30 ` Askar
  2005-05-01 10:33   ` Askar
  0 siblings, 1 reply; 5+ messages in thread
From: Askar @ 2005-05-01 10:30 UTC (permalink / raw)
  To: netfilter

dnsmasq would be a bit off topic here. :)
you can download it from ....
http://thekelleys.org.uk/dnsmasq/doc.html (I will prefer the source)
After extracting the source, read "README" for howto install its
pretty straight forward.
./configure; make install (needed)

this will copy "dnsmasq" binary /usr/sbin , which needed to running
the dnsmasq daemon by type "dnsmasq" as root.

You can find the configuration file in /etc/dnsmasq.conf

You only have to change the line...

# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
#resolv-file=

Note is not necessary coz if you don't set "resolv-fle=" , dnsmasq
will read /etc/resolv.conf for upstream dns servers (where you have
already specified your ISP dns IPs)
If you prefer to set "resolv-file=" tag then here are the setups

#vi /etc/mydnsserver (create a file where you have to hard code the
ips of your ISP dns servers

in the file type 

nameserver xxx.xxx.xxx.xx (replace xxx with the ip)
nameserver xxx.xxx.xxxx.xx (specify as many dns servers you wants)

then in /etc/resolv.conf , delete all the entries and type ...

nameserver 127.0.0.1

Now start dnsmasq , and try to confirm that its working by "dig, host,
nslook etc)

You can also use dnsmasq as DHCP server ;)

Now you have to tell iptables to allow upd port 53 hmmmm

iptables -A INPUT -p udp -s 192.168.2.0/24 --dport 53 -j ACCEPT (for client)
iptables -A OUTPUT -p udp --dport 53 -j ACCEPT (dnsmasq towards your ISP dns)


Hope this will helps

Regards
Askar 

On 5/1/05, varun_saa@vsnl.net <varun_saa@vsnl.net> wrote:
> 
> 
> ----- Original Message -----
> From: Askar <askarali@gmail.com>
> Date: Sunday, May 1, 2005 3:22 pm
> Subject: Re: DNS rules
> 
> > Again it depends, how you setup your default policies. In case you are
> > using recommended "default DROP" then you have to tell iptables to
> > allow "udp 53" towards your ISP.
> >
> > iptables -A FORWARD -p udp --dport 53 -j ACCEPT
> >
> >
> > If you are running a small LAN then running a cache only dns on your
> > gateway would be beneficial, (that it will cache the lookups)
> >
> > dnsmasq is excellent cache only dns server and i'm sure you would get
> > is running within 10 minutes.
> > you can also use bind in cache only mode.
> >
> Thanks
> 
> Can you elaborate on dnsmasq. Please.
> 
> Varun
> 
> 


-- 
I love deadlines. I like the whooshing sound they make as they fly by.
Douglas Adams


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DNS rules
  2005-05-01 10:30 ` DNS rules Askar
@ 2005-05-01 10:33   ` Askar
  2005-05-01 16:12     ` Mohamed Eldesoky
  0 siblings, 1 reply; 5+ messages in thread
From: Askar @ 2005-05-01 10:33 UTC (permalink / raw)
  To: netfilter

oops too quick to hit te Send buttong :)

if you going to set 
#resolv-file=
in /etc/dnsmasq then don't forget to repace it something

resolv-file=/etc/mydnsservers (the file that holding the IPs of your
ISP dns servers)

regards


On 5/1/05, Askar <askarali@gmail.com> wrote:
> dnsmasq would be a bit off topic here. :)
> you can download it from ....
> http://thekelleys.org.uk/dnsmasq/doc.html (I will prefer the source)
> After extracting the source, read "README" for howto install its
> pretty straight forward.
> ./configure; make install (needed)
> 
> this will copy "dnsmasq" binary /usr/sbin , which needed to running
> the dnsmasq daemon by type "dnsmasq" as root.
> 
> You can find the configuration file in /etc/dnsmasq.conf
> 
> You only have to change the line...
> 
> # Change this line if you want dns to get its upstream servers from
> # somewhere other that /etc/resolv.conf
> #resolv-file=
> 
> Note is not necessary coz if you don't set "resolv-fle=" , dnsmasq
> will read /etc/resolv.conf for upstream dns servers (where you have
> already specified your ISP dns IPs)
> If you prefer to set "resolv-file=" tag then here are the setups
> 
> #vi /etc/mydnsserver (create a file where you have to hard code the
> ips of your ISP dns servers
> 
> in the file type
> 
> nameserver xxx.xxx.xxx.xx (replace xxx with the ip)
> nameserver xxx.xxx.xxxx.xx (specify as many dns servers you wants)
> 
> then in /etc/resolv.conf , delete all the entries and type ...
> 
> nameserver 127.0.0.1
> 
> Now start dnsmasq , and try to confirm that its working by "dig, host,
> nslook etc)
> 
> You can also use dnsmasq as DHCP server ;)
> 
> Now you have to tell iptables to allow upd port 53 hmmmm
> 
> iptables -A INPUT -p udp -s 192.168.2.0/24 --dport 53 -j ACCEPT (for client)
> iptables -A OUTPUT -p udp --dport 53 -j ACCEPT (dnsmasq towards your ISP dns)
> 
> Hope this will helps
> 
> Regards
> Askar
> 
> On 5/1/05, varun_saa@vsnl.net <varun_saa@vsnl.net> wrote:
> >
> >
> > ----- Original Message -----
> > From: Askar <askarali@gmail.com>
> > Date: Sunday, May 1, 2005 3:22 pm
> > Subject: Re: DNS rules
> >
> > > Again it depends, how you setup your default policies. In case you are
> > > using recommended "default DROP" then you have to tell iptables to
> > > allow "udp 53" towards your ISP.
> > >
> > > iptables -A FORWARD -p udp --dport 53 -j ACCEPT
> > >
> > >
> > > If you are running a small LAN then running a cache only dns on your
> > > gateway would be beneficial, (that it will cache the lookups)
> > >
> > > dnsmasq is excellent cache only dns server and i'm sure you would get
> > > is running within 10 minutes.
> > > you can also use bind in cache only mode.
> > >
> > Thanks
> >
> > Can you elaborate on dnsmasq. Please.
> >
> > Varun
> >
> >
> 
> --
> I love deadlines. I like the whooshing sound they make as they fly by.
> Douglas Adams
> 


-- 
I love deadlines. I like the whooshing sound they make as they fly by.
Douglas Adams


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DNS rules
  2005-05-01 10:33   ` Askar
@ 2005-05-01 16:12     ` Mohamed Eldesoky
  0 siblings, 0 replies; 5+ messages in thread
From: Mohamed Eldesoky @ 2005-05-01 16:12 UTC (permalink / raw)
  To: Askar, netfilter

I didn't understand that part !!

On 5/1/05, Askar <askarali@gmail.com> wrote:
> oops too quick to hit te Send buttong :)
> 
> if you going to set
> #resolv-file=
> in /etc/dnsmasq then don't forget to repace it something
> 
> resolv-file=/etc/mydnsservers (the file that holding the IPs of your
> ISP dns servers)
> 
> regards
> 
> 
> On 5/1/05, Askar <askarali@gmail.com> wrote:
> > dnsmasq would be a bit off topic here. :)
> > you can download it from ....
> > http://thekelleys.org.uk/dnsmasq/doc.html (I will prefer the source)
> > After extracting the source, read "README" for howto install its
> > pretty straight forward.
> > ./configure; make install (needed)
> >
> > this will copy "dnsmasq" binary /usr/sbin , which needed to running
> > the dnsmasq daemon by type "dnsmasq" as root.
> >
> > You can find the configuration file in /etc/dnsmasq.conf
> >
> > You only have to change the line...
> >
> > # Change this line if you want dns to get its upstream servers from
> > # somewhere other that /etc/resolv.conf
> > #resolv-file=
> >
> > Note is not necessary coz if you don't set "resolv-fle=" , dnsmasq
> > will read /etc/resolv.conf for upstream dns servers (where you have
> > already specified your ISP dns IPs)
> > If you prefer to set "resolv-file=" tag then here are the setups
> >
> > #vi /etc/mydnsserver (create a file where you have to hard code the
> > ips of your ISP dns servers
> >
> > in the file type
> >
> > nameserver xxx.xxx.xxx.xx (replace xxx with the ip)
> > nameserver xxx.xxx.xxxx.xx (specify as many dns servers you wants)
> >
> > then in /etc/resolv.conf , delete all the entries and type ...
> >
> > nameserver 127.0.0.1
> >
> > Now start dnsmasq , and try to confirm that its working by "dig, host,
> > nslook etc)
> >
> > You can also use dnsmasq as DHCP server ;)
> >
> > Now you have to tell iptables to allow upd port 53 hmmmm
> >
> > iptables -A INPUT -p udp -s 192.168.2.0/24 --dport 53 -j ACCEPT (for client)
> > iptables -A OUTPUT -p udp --dport 53 -j ACCEPT (dnsmasq towards your ISP dns)
> >
> > Hope this will helps
> >
> > Regards
> > Askar
> >
> > On 5/1/05, varun_saa@vsnl.net <varun_saa@vsnl.net> wrote:
> > >
> > >
> > > ----- Original Message -----
> > > From: Askar <askarali@gmail.com>
> > > Date: Sunday, May 1, 2005 3:22 pm
> > > Subject: Re: DNS rules
> > >
> > > > Again it depends, how you setup your default policies. In case you are
> > > > using recommended "default DROP" then you have to tell iptables to
> > > > allow "udp 53" towards your ISP.
> > > >
> > > > iptables -A FORWARD -p udp --dport 53 -j ACCEPT
> > > >
> > > >
> > > > If you are running a small LAN then running a cache only dns on your
> > > > gateway would be beneficial, (that it will cache the lookups)
> > > >
> > > > dnsmasq is excellent cache only dns server and i'm sure you would get
> > > > is running within 10 minutes.
> > > > you can also use bind in cache only mode.
> > > >
> > > Thanks
> > >
> > > Can you elaborate on dnsmasq. Please.
> > >
> > > Varun
> > >
> > >
> >
> > --
> > I love deadlines. I like the whooshing sound they make as they fly by.
> > Douglas Adams
> >
> 
> --
> I love deadlines. I like the whooshing sound they make as they fly by.
> Douglas Adams
> 
> 


-- 
Mohamed Eldesoky
www.eldesoky.net
RHCE


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-05-01 16:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <915b3891601a.91601a915b38@vsnl.net>
2005-05-01 10:30 ` DNS rules Askar
2005-05-01 10:33   ` Askar
2005-05-01 16:12     ` Mohamed Eldesoky
2005-05-01  9:33 varun_saa
2005-05-01  9:52 ` Askar

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.