[Dnsmasq-discuss] Logfile rotation

2010-01-25 Thread Don Muller
Hi,

 

I just started using dnsmasq on my home network. It is running on my QNAP TS-509
NAS and it works great!

 

I have a question about log rotation. I know I have to send a SIGUSR2 to perform
a log rotation but what exactly happens? How does it work? I enabled logging and
there are messages being logged. I issued a kill -12 pid of dnsmasq but
nothing happened. IS the log supposed to be renamed and a new one created using
the same name specified in the conf file? I've read the man page but I still
can' figure out how it works and what is supposed to happen.

 

Thanks

Don



Re: [Dnsmasq-discuss] Logfile rotation

2010-01-25 Thread Santiago Zarate
I would suggest you to use logrotate directly...:
http://linux.die.net/man/8/logrotate

2010/1/24 Don Muller d...@djmuller.com:
 Hi,



 I just started using dnsmasq on my home network. It is running on my QNAP
 TS-509 NAS and it works great!



 I have a question about log rotation. I know I have to send a SIGUSR2 to
 perform a log rotation but what exactly happens? How does it work? I enabled
 logging and there are messages being logged. I issued a “kill -12 pid of
 dnsmasq” but nothing happened. IS the log supposed to be renamed and a new
 one created using the same name specified in the conf file? I’ve read the
 man page but I still can’ figure out how it works and what is supposed to
 happen.



 Thanks

 Don

 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss





Re: [Dnsmasq-discuss] Logfile rotation

2010-01-25 Thread Don Muller
logrotate does not exist on the NAS. I can write a script to perform it on 
dnsmasq if someone would tell me what happens when dnsmasq receives SIGUSR2.

-Original Message-
From: santiago.j.zar...@gmail.com [mailto:santiago.j.zar...@gmail.com] On 
Behalf Of Santiago Zarate
Sent: Sunday, January 24, 2010 11:16 PM
To: Don Muller
Cc: dnsmasq-discuss@lists.thekelleys.org.uk
Subject: Re: [Dnsmasq-discuss] Logfile rotation

I would suggest you to use logrotate directly...:
http://linux.die.net/man/8/logrotate

2010/1/24 Don Muller d...@djmuller.com:
 Hi,



 I just started using dnsmasq on my home network. It is running on my QNAP
 TS-509 NAS and it works great!



 I have a question about log rotation. I know I have to send a SIGUSR2 to
 perform a log rotation but what exactly happens? How does it work? I enabled
 logging and there are messages being logged. I issued a “kill -12 pid of
 dnsmasq” but nothing happened. IS the log supposed to be renamed and a new
 one created using the same name specified in the conf file? I’ve read the
 man page but I still can’ figure out how it works and what is supposed to
 happen.



 Thanks

 Don

 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss






Re: [Dnsmasq-discuss] Logfile rotation

2010-01-25 Thread richardvo...@gmail.com
On Sun, Jan 24, 2010 at 11:33 PM, Don Muller d...@djmuller.com wrote:
 logrotate does not exist on the NAS. I can write a script to perform it on 
 dnsmasq if someone would tell me what happens when dnsmasq receives SIGUSR2.

I strongly suspect that it closes its current file (by filehandle) and
opens again the same name.  Therefore you should relink (move/rename)
the existing logfile beforehand so that the open attempt finds no
existing file and creates a new one.

On POSIX, you can rename a file which is in use and all open
filehandles stay valid (writing the same file but with a different
name from before, IOs to a file don't involve the name except for open
itself).


 -Original Message-
 From: santiago.j.zar...@gmail.com [mailto:santiago.j.zar...@gmail.com] On 
 Behalf Of Santiago Zarate
 Sent: Sunday, January 24, 2010 11:16 PM
 To: Don Muller
 Cc: dnsmasq-discuss@lists.thekelleys.org.uk
 Subject: Re: [Dnsmasq-discuss] Logfile rotation

 I would suggest you to use logrotate directly...:
 http://linux.die.net/man/8/logrotate

 2010/1/24 Don Muller d...@djmuller.com:
 Hi,



 I just started using dnsmasq on my home network. It is running on my QNAP
 TS-509 NAS and it works great!



 I have a question about log rotation. I know I have to send a SIGUSR2 to
 perform a log rotation but what exactly happens? How does it work? I enabled
 logging and there are messages being logged. I issued a “kill -12 pid of
 dnsmasq” but nothing happened. IS the log supposed to be renamed and a new
 one created using the same name specified in the conf file? I’ve read the
 man page but I still can’ figure out how it works and what is supposed to
 happen.



 Thanks

 Don

 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss




 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss




Re: [Dnsmasq-discuss] Problems With Windows Vista

2010-01-25 Thread Simon Kelley

Jeremy M wrote:
What will the broadcast address in the --dhcp-range configuration affect 
if not broadcast replies?


The value of the broadcast address option sent to the client. This 
will eventually be installed in the client's network interface, along 
with the allocated IP address and the netmask. The broadcast address and 
netmask are optional in dhcp-range, since they are normally copied from 
the interface on the server which connects to the subnet the client is 
on. It's possible to omit them, except that the netmask has to be 
supplied when using a DHCP-relay, as dnsmasq can't determine it 
automatically.


Don't forget that when the DHCP server is broadcasting to the client, 
the client doesn't yet know its IP address, so it can't respond to the 
network-broadcast address. Hence the use of 255.255.255.255



HTH


Simon.




On Sun, Jan 24, 2010 at 3:39 AM, Simon Kelley si...@thekelleys.org.uk 
mailto:si...@thekelleys.org.uk wrote:


Jeremy M wrote:

You were exactly right.  The firewall was blocking outbound
broadcast packets on the subnet.  I'm not sure if this is
correct, but my config specifies:

 
 dhcp-range=wireless,192.168.3.50,192.168.3.250,255.255.255.0,192.168.3.255,12h


I think that's saying the broadcast address should be
192.168.3.255, but broadcasts attempts are actually going out on
255.255.255.255.



255.255.255.255 is always a valid broadcast address on IP networks,
and the correct one to use for DHCP.

255.255.255.255 = limited broadcast address, propogates only on one
network segment.

192.168.3.255 = network broadcast address. May be routed to other
network segments be suitably configured routers.

I'm glad that's fixed. Probably worth a FAQ entry!

Cheers,

Simon.







Re: [Dnsmasq-discuss] Logfile rotation

2010-01-25 Thread Simon Kelley

richardvo...@gmail.com wrote:

On Sun, Jan 24, 2010 at 11:33 PM, Don Muller d...@djmuller.com wrote:

logrotate does not exist on the NAS. I can write a script to perform it on 
dnsmasq if someone would tell me what happens when dnsmasq receives SIGUSR2.


I strongly suspect that it closes its current file (by filehandle) and
opens again the same name.  Therefore you should relink (move/rename)
the existing logfile beforehand so that the open attempt finds no
existing file and creates a new one.


That's correct, but you may also have to create the new one and change 
its ownership/permissions so that dnsmasq can write to it. Remember that 
whilst running dnsmasq will probably not be uid=0



Cheers,

Simon.




[Dnsmasq-discuss] basic host name problem

2010-01-25 Thread Adam Hardy

Hi,

I've got a gateway server running dnsmasq for dhcp on my LAN and I've got a 
couple of problems with the host names of the dhcp clients.


The first is a Belkin print server which picks up its ip address and passes thro 
its hostname MFD8FDC7. This appears in dnsmasq.leases - so I should be able to 
communicate with it now, right?


There must be something missing from my dnsmasq config because I see now that 
any attempt to use the host names of dhcp clients from the gateway server fail 
with  unknown host  I'm on debian stable if that makes any difference.


I've got 127.0.0.1 in my /etc/hosts

127.0.0.1   localhost isengard.localdomain isengard
192.168.0.2 isengard.localdomain

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

along with all that ipv6 stuff, which someone somewhere recommended at some 
point but I don't recall the details now (should I ditch it?)


Plus this is the settings in dnsmasq.conf:

adam@isengard:~$ decomment.sh /etc/dnsmasq.conf
domain-needed
bogus-priv
filterwin2k
server=/localdomain/127.0.0.1
local=/localdomain/
expand-hosts
domain=localdomain
dhcp-range=192.168.0.3,192.168.0.254
dhcp-option=option:router,192.168.0.2
dhcp-option=option:mtu,1500

Any inspiration gratefully received.



Re: [Dnsmasq-discuss] basic host name problem

2010-01-25 Thread richardvo...@gmail.com
On Mon, Jan 25, 2010 at 12:20 PM, Adam Hardy
adam@cyberspaceroad.com wrote:
 Hi,

 I've got a gateway server running dnsmasq for dhcp on my LAN and I've got a
 couple of problems with the host names of the dhcp clients.

 The first is a Belkin print server which picks up its ip address and passes 
 thro
 its hostname MFD8FDC7. This appears in dnsmasq.leases - so I should be able to
 communicate with it now, right?

 There must be something missing from my dnsmasq config because I see now that
 any attempt to use the host names of dhcp clients from the gateway server fail
 with  unknown host  I'm on debian stable if that makes any difference

Sounds like your gateway is not using dnsmasq for lookups.  dnsmasq
tells dhcp clients to use its services, but the gateway you will have
to manually configure in /etc/resolv.conf to send requests to the
local dnsmasq process.



 I've got 127.0.0.1 in my /etc/hosts

 127.0.0.1       localhost isengard.localdomain isengard
 192.168.0.2     isengard.localdomain

 # The following lines are desirable for IPv6 capable hosts
 ::1     localhost ip6-localhost ip6-loopback
 fe00::0 ip6-localnet
 ff00::0 ip6-mcastprefix
 ff02::1 ip6-allnodes
 ff02::2 ip6-allrouters
 ff02::3 ip6-allhosts

 along with all that ipv6 stuff, which someone somewhere recommended at some
 point but I don't recall the details now (should I ditch it?)

 Plus this is the settings in dnsmasq.conf:

 adam@isengard:~$ decomment.sh /etc/dnsmasq.conf
 domain-needed
 bogus-priv
 filterwin2k
 server=/localdomain/127.0.0.1
 local=/localdomain/
 expand-hosts
 domain=localdomain
 dhcp-range=192.168.0.3,192.168.0.254
 dhcp-option=option:router,192.168.0.2
 dhcp-option=option:mtu,1500

 Any inspiration gratefully received.

 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss