Re: [Dnsmasq-discuss] code style, decision

2019-09-12 Thread Jan Psota
> If at all, I'd vote for converting the existing tabstops to 8 spaces
> and keep the indentation step of 2 spaces per level.

As Simon wrote, it is unnecessary. He uses 2-space indentation, as I
can see, and every 8 spaces (32) are put with 1 tab (09). Nothing can
go wrong if only editor is set to sane 8-space tab.

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


Re: [Dnsmasq-discuss] code improvement WAS: code style

2019-09-07 Thread Jan Psota
What about "indent -kr" style?

In 16x9 monitor era let's not talk about 4-space long tabs, please :-)
(I actually use old 17" CRT, which I like, but I'm still sure that
indentation should rely on ASCII 09 - tab character)

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


Re: [Dnsmasq-discuss] duplicate dhcp-host IP address

2018-11-12 Thread Jan Psota
> On 12/11/2018 16:11, Donald Muller wrote:
> > You could put a reservation in dnsmasq for the wired and wireless
> > MAC addresses and give them the same IP address.  
> 
> How?
> 
In /etc/dnsmask.hosts I have:
ee:33:99:99:cc:dd,88:33:99:88:ee:00,192.168.1.10,hostname
 ethernet ^^^, wifi ^^^

but it _does not work for some laptops_! I don't understand, how, but
it does not. And for some it works like expected. Both on Windows 7!

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


Re: [Dnsmasq-discuss] systemd service improvements

2016-07-05 Thread Jan Psota
Dnia 2016-07-05, o godz. 16:28:14
Craig Andrews <candr...@integralblue.com> napisał(a):
[...]

I agree with _all_ you've written.

(I'm Gentoo on systemd user - 7s to boot from grub prompt to xdm.
Booted from cheap pendrive not SSD! :-)

--
Jan Psota

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


Re: [Dnsmasq-discuss] Announce: dnsmasq 2.76 release-candidate.

2016-05-10 Thread Jan Psota
> I've just pushed 2.76rc1 to the usual places.
Wait for pl.po! :-)
(tomorrow night I'll prepare it)

--
jasiu

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


Re: [Dnsmasq-discuss] Announce: release candidate dnsmasq-2.60rc1

2012-02-29 Thread Jan Psota
Dnia 2012-02-29, o godz. 18:30:57
/dev/rob0 r...@gmx.co.uk napisał(a):

 On Tue, Feb 28, 2012 at 08:05:41PM +, Simon Kelley wrote:
  The DHCPv6 code is looking pretty good now (thanks all testers).
  
  So good, in fact, that I think it's time to start moving gently 
  towards a release. I've just created 2.60rc1, available at
 
 Just a thought ... having added DHCPv6, perhaps this warrants a major 
 release, i.e., 3.0? :)
.0 is always broken - better 3.1 ;-)

git, lua. And Linux-3. I would vote for major=3 too!

The only reason not to do it is when Simon thinks about something
really revolutionary.

--
jasiu

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


Re: [Dnsmasq-discuss] git/svn/cvs? dnscrypt support?

2011-12-13 Thread Jan Psota
2011-12-13, 12:13:39:
Cyril Plisko cyril.pli...@mountall.com wrote:
  Simon: I'll be in a position to do stuff like making git access available. 
  I'm
 
 What about github ?
 
Gitorious is OK.
Easier, I'd say.

--
jasiu



Re: [Dnsmasq-discuss] Howto realize configuration from isc DHCP - Server‏

2011-09-18 Thread Jan Psota
2011-09-18, 14:22:00
Herbert Halegmaier halegmai...@hotmail.com:

 i have a simple question. Is it possible to realize following ISC - DHCP - 
 Server configuration with dnsmasq:
 
 class SiemensPhone {
   match if (
 (substring(hardware, 1, 3) = 00:01:E3) or
 (substring(hardware, 1, 3) = 00:1A:E8)
   );
   vendor-option-space OptiIpPhone;
 [...]

I guess dhcp-mac config option will do the job (manual l. 670).

--
jasiu



Re: [Dnsmasq-discuss] Dnsmasq not always seeing unicast packets

2011-09-12 Thread Jan Psota
 Unfortunately using multiple range and interface arguments won't work since I
 will need to run 100, with different conf files for each.
 
Didn't you forget to set bind-interfaces?

--
jasiu



Re: [Dnsmasq-discuss] allow unknown clients

2011-09-08 Thread Jan Psota
 How can I setup dnsmasq to provide IP via dhcp to unknwon clients?
 I get always this.
 
 DHCPDISCOVER(eth2) 08:00:37:a0:ca:76 no address available
 
 The option 'dhcp-authoritative' is in the config file.
 
That's not the point. You need dhcp-range, like this:
dhcp-range=192.168.1.2,192.168.1.14,255.255.255.240,12h
Of course  ^^^ have to match your interface's IP.

Look into manual, line 449-.
Default config have this too, but commented out (l. 136).

--
jasiu



Re: [Dnsmasq-discuss] PXE boot using dnsmasq (load kernel + initrd)

2011-09-03 Thread Jan Psota
 Can i boot a kernel + initrd using dnsmasq's tftp server. Most
 available literature suggests using tftp-hpa.
 
Without any problem.
I use it this way, too.

All is in example dnsmasq.conf, and you'll need:
enable-tftp
tftp-root=/...  # readable by user dnsmasq is running
tftp-secure # I set it
dhcp-boot=pxelinux.0# because I use PXE

All kernel boot options are set in $tftp-root/pxelinux.cfg/default
(syslinux package provides all other needed stuff).

--
jasiu



Re: [Dnsmasq-discuss] regex-patch for dnsmasq-2.58

2011-08-27 Thread Jan Psota
2011-08-27, 05:16:49
Jan Seiffert kaffeemons...@googlemail.com wrote:

 2011/8/26 Simon Kelley si...@thekelleys.org.uk:
  Dnsmasq 2.58 is done, it's available from the usual place
 
 [...]
 Attached is the regex-patch for 2.58, for those who like it.
 
Thanks!
Works :-)

For Gentoo users: added to bleeding-edge (2.58-r1 USE=regex)
and maintainer informed that way ;-)

--
jasiu



Re: [Dnsmasq-discuss] [suggestion] tiny embedded web server

2011-07-09 Thread Jan Psota
[about web server embedded in dnsmasq]

1. I don't see the need.
2. ...but if Simon think about it, I would propose libmicrohttpd
   [http://www.gnu.org/s/libmicrohttpd/]

I made some tests:
1. example http server running takes 272KB RAM (free - free),
   (second process didn't use any memory ;-)
2. 1728 bytes is a difference between hello world and http server
   (not stripped, 1352 bytes when stripped [5880 server - 4528 hello])
3. library takes 60KB of disk space (70KB when compiled with SSL
   support), and does not need and libraries dnsmasq would not use
   anyhow (libc.so.6 and libpthread.so.0)
4. it's a library intended to be used that way - maybe some other
   programs will take advantage of it in future (none on my system
   for now)

All that on amd64, Gentoo Linux, net-libs/libmicrohttpd-0.9.12 no ssl.

--
jasiu



Re: [Dnsmasq-discuss] DHCP doesn't seem to respond to requests(?)

2011-05-19 Thread Jan Psota
 However, I'm struggling with the DHCP portion.  This is being run on a linux
 server in my small network, and DHCP has been supplied by the cable modem.
 (I did turn off DHCP at the modem.)  I have decided to start small -
 connecting with an UBUNTU laptop - but my dhclient eth0 requests
 consistently end with No DHCPOFFERS received.  I've been through the past
 year of your logs, looking at subjects including DHCP and didn't find a hit,
 so I've come here.
 
 My configuration is simple for now:
 
 domain-needed
 bogus-priv
 expand-hosts
 domain=lovelady.com
 dhcp-range=192.168.0.150,192.168.0.249,72h
 
1. turn on logging by adding log-dhcp and tail -f .../messages
2. run tcpdump -i eth0 port bootpc or port bootps on server

 iptables -A INPUT -p UDP --dport bootpc -j ACCEPT || die
 iptables -A INPUT -p UDP --dport bootps -j ACCEPT || die
 
On server?

Can't you turn off all firewalling on client and server?
(unconnecting them from dangerous world first ;-)

You can also test it adding tap interface (can be in a bridge with eth0)
and then running something like:
qemu -net nic,model=pcnet -net tap,ifname=tap0,script=no,downscript=no -boot n
...and watch tcpdump -i tap0 (br0)

--
jasiu



Re: [Dnsmasq-discuss] DHCP doesn't seem to respond to requests(?)

2011-05-19 Thread Jan Psota
Dnia 2011-05-18, o godz. 21:30:11
dnsm...@lovelady.com napisał(a):

   My configuration is simple for now:
 
 # (latest)
 domain-needed
 bogus-priv
 expand-hosts
 domain=lovelady.com
 dhcp-range=192.168.0.150,192.168.0.249,72h
 dhcp-host=00:23:8b:8a:ad:70,192.168.0.249
 log-dhcp
 
  1. turn on logging by adding log-dhcp and tail -f .../messages
  2. run tcpdump -i eth0 port bootpc or port bootps on server
 
 Stopped iptables and flushed with -F on both systems.
 
iptables -F does not change policy. If you had DROP...

# shorewall clear
# tcpdump
listening on loc, link-type EN10MB (Ethernet), capture size 65535 bytes
03:39:55.090620 IP 0.0.0.0.bootpc  255.255.255.255.bootps: BOOTP/DHCP,
Request from 52:54:00:12:34:56 (oui Unknown), length 390
03:39:55.091080 IP 192.168.2.1.bootps  192.168.2.2.bootpc: BOOTP/DHCP,
Reply, length 300

# iptables -P INPUT DROP
# tcpdump
listening on loc, link-type EN10MB (Ethernet), capture size 65535 bytes
03:40:37.588198 IP 0.0.0.0.bootpc  255.255.255.255.bootps: BOOTP/DHCP,
Request from 52:54:00:12:34:56 (oui Unknown), length 390
[ ** no reply *** ]
03:40:38.560985 IP 0.0.0.0.bootpc  255.255.255.255.bootps: BOOTP/DHCP,
Request from 52:54:00:12:34:56 (oui Unknown), length 390

--
jasiu



Re: [Dnsmasq-discuss] DHCP doesn't seem to respond to requests(?)

2011-05-19 Thread Jan Psota
Dnia 2011-05-18, o godz. 22:07:38
dnsm...@lovelady.com napisał(a):

 Sorry, I don't know what you mean.  A little on the cryptic side for me,
 sorry.
 
 I have no shorewall.  I followed these instructions, relevant to this
 [...]
Oh, I only wanted to say, that DROP policy on servers' input side will
cause exactly this effect. You have it set to ACCEPT but only calling
iptables with '-L -v' will give you a full view, because without it you
don't know on what interface what rule operates. If 'iptables -F' on
tables you send won't do the job - I have no idea :-(

--
jasiu



Re: [Dnsmasq-discuss] Serve DNS requests to hosts outside subnet

2011-05-11 Thread Jan Psota
 I would like to resolve domains using it from the clients that are
 connected via the VPN, but it haven't figured out how, the clients can
 reach dnsmasq but the requests are refused. to complicate things, the
 VPN with racoon does not offer any kind of interface to bind, all the
 routing is done via security associations.
 
For sure: you don't use
bind-interfaces
or
interface=...
?

--
jasiu



Re: [Dnsmasq-discuss] dhcp-script on dnsmasq

2011-04-15 Thread Jan Psota
 However, if I say ls -l /tmp/post-lease.sh its most definitely exists and
 its chmodded 777 just to be safe.
 
Mode 777 is never safe...
Anybody can edit it and play with rm on root rights.

 Am I missing something important?
/tmp can be mounted noexec if it points to /dev/shm for example

What you see when you write /tmp/post-lease.sh?

--
jasiu



Re: [Dnsmasq-discuss] Announce: dnsmasq-2.56

2011-02-16 Thread Jan Psota
2011-02-16, 15:45:41 Matthias Andree wrote:
 FreeBSD now has 2.56_1,1 - it is 2.56 + the config file parser fix.
 
Gentoo users have it too: bleeding-edge, 2.56-r1.

--
jasiu



Re: [Dnsmasq-discuss] Announce: dnsmasq-2.56

2011-02-15 Thread Jan Psota
2011-02-14 20:37:57 Simon Kelley wrote:
 Dnsmasq 2.56 is now available, download it from
 [...]

To Gentoo users:
it is (2.56) in bleeding-edge overlay.
(since yesterday, of course! ;-)

--
jasiu



Re: [Dnsmasq-discuss] Multiple Macs - Same IP

2011-01-12 Thread Jan Psota
JT j...@openscg.com napisał(a):
 Is there a way that I can convince dnsmasq to assign the same IP to the two
 different mac addresses? I should note the saving grace here is that the
 
From man.

dhcp-host
[...]
As  a  special  case,  it  is possible to include more than one
hardware address. eg:
--dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2 This allows
an IP address to  be  associated  with multiple hardware addresses, and
gives dnsmasq permission to abandon a DHCP lease to one of the hardware
addresses when another  one  asks  for  a lease.  Beware  that  this
is a dangerous thing to do, it will only work reliably if only one of
the hardware addresses is active at any time and there is no way for
dns- masq  to enforce this. It is, for instance, useful to allocate a
stable IP address to

And I suggest using dhcp-hostsfile - less to write and more elegant way.

--
Jan



Re: [Dnsmasq-discuss] Feature request for dhcp-hostfiles to behave like addn-hosts

2010-12-16 Thread Jan Psota
  A tangential question, I've increased MAXLEASES to
  
  #define MAXLEASES 16384
  
  in config.h. Is there any danger in having this many leases and
  increasing this even higher if necessary? I'm a few weeks away from
  being able to test this at scale and appreciate any warnings or
  feedback anyone might have now.
  
 If you get bitten anywhere, it will be performance writing the lease
 file. That gets truncated and re-written for every change. On reasonable
 storage it should be fine, but maybe not on a slow flash drive. If it's
 a problem that's that prefect excuse to write a script to move the
 database to a MySQL backend, right?
 
If you would talk about SQLite rather, Simon, it would look more
achievable :-) Nearly every Linux (and not only) uses SQLite in some
places nowadays, and any database which needs a server complicates
things. I understand, that it is only a proposal for users, but with
one-file-database it can be included as #ifdef SQLITE patch.

--
Jan



Re: [Dnsmasq-discuss] Re : Feature request for dhcp-hostfiles to behave like addn-hosts

2010-12-16 Thread Jan Psota
   A tangential  question, I've increased MAXLEASES to
   
   #define MAXLEASES  16384
   [...]
  a problem that's that prefect excuse  to write a script to move the
  database to a MySQL backend,  right?  
  [...]
 What about sqlite? IMHO MySQL seems a little bit overkill for that purpose.
 
I pressed Send, and then looked into INBOX... :-)))

--
Jan



Re: [Dnsmasq-discuss] Handling unknown RTYPEs and querying for version...

2010-11-29 Thread Jan Psota
Here are results from my system:
http://n3.netalyzr.icsi.berkeley.edu/summary/id=ae81b058-4485-88b87afa-9e91-46b0-90a7#feedback
I have port 53 blocked for TCP output.
If I should unlock it for some reasons - please tell me.

dnsmasq-2.56test17 / no-IPv6

--
jasiu



Re: [Dnsmasq-discuss] Icon/logo for dnsmasq?

2010-10-19 Thread Jan Psota
Justin Clift wrote about an icon for dnsmasq.
Maybe it could look something like a sign of infinity?

--
jasiu



Re: [Dnsmasq-discuss] Can't get dnsmasq to work on OS X 10.6 as DNS forwarder only

2010-07-31 Thread Jan Psota
Sung Pae s...@sungpae.com wrote:
 ...and on OS X,
 
   sudo lsof -Pni
 
 will give very similar output.

...and so it does on Linux, thanks!

--
jasiu



Re: [Dnsmasq-discuss] Single-file config

2010-07-06 Thread Jan Psota
  static-ip-dns or static-dhcp-dns?
 

Simon wrote:
 But less flexible than dns-host, because it's all-or-nothing. It also
 requires new behaviour to be defined, whilst just allowing the
 equivalent of /etc/hosts lines doesn't. The semantics may be a bit
 obscure, but they are at least easy to define in terms of current behaviour.
 
As I know you, you will implement both ways, Simon... :-)

And with static-dhcp-dns (^^^) dhcp-host file (lines) will
replace /etc/hosts functionality without any additional work from
admin's side.

--
jasiu



Re: [Dnsmasq-discuss] tftp 'Permission denied' issue...

2010-05-16 Thread Jan Psota
Dnia 2010-05-16, o godz. 20:32:07
clemens fischer ino-n...@spotteswoode.dnsalias.org napisał(a):
 Steve Elliott wrote:
 [...]
 My theory is that one of the directories your bootrom.pxe.o is burried
 in doesn't have execute permissions for user nobody.
 
 For this kind of trouble I have this little bash function:
   dirperms() {
 [...]
 
Why don't you check it with:
su -s /bin/bash - nobody

and trying to read that file then?

--
jasiu



[Dnsmasq-discuss] dnsmasq on Gentoo - always latest in overlay

2010-04-26 Thread Jan Psota
Simon wrote:
 http://www.thekelleys.org.uk/dnsmasq/test-releases/dnsmasq-2.53test19.tar.gz

Dnsmasq users on Gentoo!
There is always latest stable and test/rc version in my overlay 'jasiu':
http://gitorious.org/jasiu
It is on layman's list.

--
jasiu



[Dnsmasq-discuss] Fw: two stupid questions

2009-11-16 Thread Jan Psota
Christopher Scott csc...@agencypja.com wrote:
 1.
 The '--test' option as described in the manpage doesn't appear to do  
 anything (on my Mac OS X 10.5-based box); am I doing something
 wrong? shouldn't the command be:
 
 /usr/local/sbin/dnsmasq --test
Works as expected on Gentoo Linux:

gandalf ~ # dnsmasq --test
dnsmasq: syntax check OK.
gandalf ~ # dnsmasq --test -kasj

dnsmasq: bad command line options: try --help

 2.
 I'm unclear on how to review the logs - I see references in the  
 documentation to sending SIGUSR1 and SIGUSR2 commands but don't  
 understand HOW to do that.
If Mac OS X is as close to UNIX as I expect, running:
killall -USR1 dnsmasq
as privileged user should provoke dnsmasq to write to log
(/var/log/messages for us) something like:

Nov 16 21:21:21 gandalf dnsmasq[5553]: time 1258402881
Nov 16 21:21:21 gandalf dnsmasq[5553]: cache size 150, 0/0 cache insertions 
re-used unexpired cache entries.
Nov 16 21:21:21 gandalf dnsmasq[5553]: queries forwarded 0, queries answered 
locally 0
Nov 16 21:21:21 gandalf dnsmasq[5553]: server 192.168.7.5#53: queries sent 0, 
retried or failed 0
Nov 16 21:21:21 gandalf dnsmasq[5553]: server 192.168.1.1#53: queries sent 0, 
retried or failed 0

Alternatively you can check dnsmasq's PID with 'ps' command and then
use
kill -USR1 [PID]
like:
gandalf ~ # ps -C dnsmasq
  PID TTY  TIME CMD
 6136 ?00:00:00 dnsmasq
gandalf ~ # kill -USR1 6136
gandalf ~ #
#[take a look on logs]

-- 
Jan Psota



Re: [Dnsmasq-discuss] dns on loopback but dhcp on extif?

2009-02-26 Thread Jan Psota
 Is there a way to get the dhcp server to run on the external
 interface, but the dns portion to listen on the loopback or some
 other ip?
Run two processes of dnsmasq :-).
I guess You don't want to serve names of DHCP clients on external
network?

--
jasiu


Tylko teraz domeny, serwer i Strona WWW za darmo!
Dla Twojej firmy
www.nazwa.pl



Re: [Dnsmasq-discuss] dnsmasq-2.43rc3 caps failed

2008-07-10 Thread Jan Psota
  On Linux 2.6.24 (Gentoo kernel, though I don't see why it wouldn't 
  happen on other distros), starting this release with the user set
  to anything other than root fails with this message:
  
  dnsmasq: setting capabilities failed: Operation not permitted
  
 
 I think I may have been guilty of answering the question I expected
 in my last reply. Its valid if what you are talking about is running
 (as root)
 
 dnsmasq --user someuser
 
 if you are actually starting dnsmasq as someuser (presumably
 listening on a high port) then I can see that changing the capability
 error from soft to hard is a problem. The solution is not to attempt
 any of that stuff if the original process uid is non-zero.
 
 I'll fix that before a final release.
?
I use kernel 2.6.25 on recent Gentoo, and have no such problem (and
never before had). I never cared of using capabilities (I don't know
much about it, but enough to remove capabilities setting from kernel
tun driver -- it does not let run qemu -net tun as normal user).
On Gentoo dnsmasq is started that way:
start-stop-daemon --start --exec /usr/sbin/dnsmasq \
--pidfile /var/run/dnsmasq.pid -- -x /var/run/dnsmasq.pid \
${DNSMASQ_OPTS} # =
so it runs as nobody, as he likes. Running:
dnsmasq --user nobody
as root goes without problems and as normal user I must use:
/usr/sbin/dnsmasq -u jasiu --dhcp-alternate-port 1067 -d -p 1053
and disable TFTP server because of port numbers.
All on 2.43rc3. Kernel compiled for my machine. Dnsmasq runs well.

--
jasiu


Firmowy Serwis WWW
Setki projektow! Darmowy test przez 14 dni!
www.nazwa.pl



Re: [Dnsmasq-discuss] DHCP error

2008-05-08 Thread Jan Psota
I've met such bahavior. NFS is guilty.
If You start dnsmasq before nfs,
one of nfs.* probably won't start. But maybe it will?
I use recent versions of nfs-utils and dnsmasq,
and have no such problems.

Try to run 'strace dnsmasq -d' from shell,
so You can tell to which port it cannot bind?

There was such problem discussed on that list some weeks ago.

--
jasiu



Re: [Dnsmasq-discuss] DHCP error

2008-05-08 Thread Jan Psota
Can it come from using ipv6?
I met such problem with ipv6 disabled.

--
jasiu