[Dnsmasq-discuss] Conditional arguments depending on dhcp option 77 (user class)
Hi list, configuring ipxe boot recommends configuring an isc-dhcp-server i.e. in this way: if exists user-class and option user-class = "iPXE" { filename "http://my.web.server/real_boot_script.php;; } else { filename "undionly.kpxe"; } reffering to dhcp option 77 "User Class Information". Is it possible to build a similar construct in dnsmasq.conf? Tfh! Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] howto see running configuration?
Hi list, is there a possibility to see the running configuration in dnsmasq? i.e. if I use multiple nested configuration files, this would be helpful. Regards, Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Changing tftp-path / file depending on tag?
Hi list, i have a configuration here with 4 NICs. The config exports different tftp-server addresses (dhcp-Byte 128) for correct resolving: -- snip -- dhcp-range=set:gw94,192.168.94.50,192.168.94.150,255.255.255.0,12h dhcp-range=set:gw95,192.168.95.50,192.168.95.150,255.255.255.0,12h dhcp-range=set:gw96,192.168.96.50,192.168.96.150,255.255.255.0,12h dhcp-range=set:gw97,192.168.97.50,192.168.97.150,255.255.255.0,12h dhcp-option=tag:gw94,128,192.168.94.254 dhcp-option=tag:gw95,128,192.168.95.254 dhcp-option=tag:gw96,128,192.168.96.254 dhcp-option=tag:gw97,128,192.168.97.254 dhcp-boot=undionly.kkkpxe enable-tftp tftp-root=/opt/dmi/tftproot -- snap -- Now i want to offer different undionly.kkkpxe for every subnet. I think on something like dhcp-boot=tag:gw94,undionly-94.kkkpxe dhcp-boot=tag:gw95,undionly-95.kkkpxe dhcp-boot=tag:gw96,undionly-96.kkkpxe dhcp-boot=tag:gw97,undionly-97.kkkpxe Is this possible? Tfh! OLiver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] restricting to one interface doesnt work
Hi list, i try to restrict the dns of dnsmasq to one interface (3 existing interfaces, I hided ppp0), but it seems, that it doesnt work. My config: server=//141.1.1.1 local=/heimserver/ address=/owncloud/192.168.0.254 dhcp-range=set:gw2,192.168.2.50,192.168.2.150,255.255.255.0,12h dhcp-range=::,constructor:sixxs,ra-names dhcp-range=::,constructor:p3p1,ra-names dhcp-option=tag:gw2,128,192.168.2.254 dhcp-option=252,http://heimserver/wpad.dat; dhcp-option-force=208,f1:00:74:7e dhcp-option-force=210,/opt/dmi/tftproot/ dhcp-boot=undionly.kkpxe enable-tftp tftp-root=/opt/dmi/tftproot log-queries log-dhcp my ifconfig. # ifconfig | grep mtu -A1 lo: flags=73UP,LOOPBACK,RUNNING mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 -- p1p1: flags=4163UP,BROADCAST,RUNNING,MULTICAST mtu 1500 inet 192.168.0.254 netmask 255.255.255.0 broadcast 192.168.0.255 -- p2p1: flags=4099UP,BROADCAST,MULTICAST mtu 1500 inet 192.168.11.254 netmask 255.255.255.0 broadcast 192.168.11.255 -- p3p1: flags=4163UP,BROADCAST,RUNNING,MULTICAST mtu 1500 inet 192.168.2.254 netmask 255.255.255.0 broadcast 192.168.2.255 So here only p3p1 is addressed here. But if i look for open ports, on all interfaces 53 is open: # nmap 192.168.11.254 Starting Nmap 6.25 ( http://nmap.org ) at 2014-06-24 23:16 CEST Nmap scan report for 192.168.11.254 Host is up (0.00014s latency). Not shown: 997 closed ports PORT STATE SERVICE 53/tcp open domain 749/tcp open kerberos-adm 2000/tcp open cisco-sccp Nmap done: 1 IP address (1 host up) scanned in 0.76 seconds heimserver dnsmasq.d # nmap 192.168.2.254 Starting Nmap 6.25 ( http://nmap.org ) at 2014-06-24 23:16 CEST Nmap scan report for 192.168.2.254 Host is up (0.00040s latency). Not shown: 997 closed ports PORT STATE SERVICE 53/tcp open domain 749/tcp open kerberos-adm 2000/tcp open cisco-sccp Nmap done: 1 IP address (1 host up) scanned in 1.72 seconds heimserver dnsmasq.d # nmap 192.168.0.254 Starting Nmap 6.25 ( http://nmap.org ) at 2014-06-24 23:16 CEST Nmap scan report for heimserver.koenigsteinstr.muc (192.168.0.254) Host is up (0.00011s latency). Not shown: 997 closed ports PORT STATE SERVICE 53/tcp open domain 749/tcp open kerberos-adm 2000/tcp open cisco-sccp for being sure, dnsmasq is the only dns-server here, i did this: # netstat -vanpe | grep :53 netstat: no support for `AF INET (sctp)' on this system. netstat: no support for `AF INET (sctp)' on this system. tcp0 0 0.0.0.0:53 0.0.0.0:* LISTEN 0 170125312137/dnsmasq tcp0 0 192.168.0.254:5038 192.168.0.1:53788 VERBUNDEN 101166618027070/asterisk tcp6 0 0 :::53 :::* LISTEN 0 170125612137/dnsmasq udp0 0 0.0.0.0:53 0.0.0.0:* 0 1701252 12137/dnsmasq udp6 0 0 :::53 :::*0 1701255 12137/dnsmasq netstat: no support for `AF IPX' on this system. netstat: no support for `AF AX25' on this system. netstat: no support for `AF X25' on this system. netstat: no support for `AF NETROM' on this system. So whats wrong here? Has dnsmasq problems with interfaces named p1p1, p2p1 etc. ? Tfh! Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] addendum 2
This is with dnsmasq-2.71, built on gentoo system with via c3-2 processor. Hth, OIiver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] [solved] Re: restricting to one interface doesnt work
Hi list, writing together the problem sometimes brings enlightement: bind-interfaces option does the wanted thing. Thanks for reading! Oliver Am 24.06.2014 23:28, schrieb Oliver Rath: Hi list, i try to restrict the dns of dnsmasq to one interface (3 existing interfaces, I hided ppp0), but it seems, that it doesnt work. My config: server=//141.1.1.1 local=/heimserver/ address=/owncloud/192.168.0.254 dhcp-range=set:gw2,192.168.2.50,192.168.2.150,255.255.255.0,12h dhcp-range=::,constructor:sixxs,ra-names dhcp-range=::,constructor:p3p1,ra-names dhcp-option=tag:gw2,128,192.168.2.254 dhcp-option=252,http://heimserver/wpad.dat; dhcp-option-force=208,f1:00:74:7e dhcp-option-force=210,/opt/dmi/tftproot/ dhcp-boot=undionly.kkpxe enable-tftp tftp-root=/opt/dmi/tftproot log-queries log-dhcp my ifconfig. # ifconfig | grep mtu -A1 lo: flags=73UP,LOOPBACK,RUNNING mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 -- p1p1: flags=4163UP,BROADCAST,RUNNING,MULTICAST mtu 1500 inet 192.168.0.254 netmask 255.255.255.0 broadcast 192.168.0.255 -- p2p1: flags=4099UP,BROADCAST,MULTICAST mtu 1500 inet 192.168.11.254 netmask 255.255.255.0 broadcast 192.168.11.255 -- p3p1: flags=4163UP,BROADCAST,RUNNING,MULTICAST mtu 1500 inet 192.168.2.254 netmask 255.255.255.0 broadcast 192.168.2.255 So here only p3p1 is addressed here. But if i look for open ports, on all interfaces 53 is open: # nmap 192.168.11.254 Starting Nmap 6.25 ( http://nmap.org ) at 2014-06-24 23:16 CEST Nmap scan report for 192.168.11.254 Host is up (0.00014s latency). Not shown: 997 closed ports PORT STATE SERVICE 53/tcp open domain 749/tcp open kerberos-adm 2000/tcp open cisco-sccp Nmap done: 1 IP address (1 host up) scanned in 0.76 seconds heimserver dnsmasq.d # nmap 192.168.2.254 Starting Nmap 6.25 ( http://nmap.org ) at 2014-06-24 23:16 CEST Nmap scan report for 192.168.2.254 Host is up (0.00040s latency). Not shown: 997 closed ports PORT STATE SERVICE 53/tcp open domain 749/tcp open kerberos-adm 2000/tcp open cisco-sccp Nmap done: 1 IP address (1 host up) scanned in 1.72 seconds heimserver dnsmasq.d # nmap 192.168.0.254 Starting Nmap 6.25 ( http://nmap.org ) at 2014-06-24 23:16 CEST Nmap scan report for heimserver.koenigsteinstr.muc (192.168.0.254) Host is up (0.00011s latency). Not shown: 997 closed ports PORT STATE SERVICE 53/tcp open domain 749/tcp open kerberos-adm 2000/tcp open cisco-sccp for being sure, dnsmasq is the only dns-server here, i did this: # netstat -vanpe | grep :53 netstat: no support for `AF INET (sctp)' on this system. netstat: no support for `AF INET (sctp)' on this system. tcp0 0 0.0.0.0:53 0.0.0.0:* LISTEN 0 170125312137/dnsmasq tcp0 0 192.168.0.254:5038 192.168.0.1:53788 VERBUNDEN 101166618027070/asterisk tcp6 0 0 :::53 :::* LISTEN 0 170125612137/dnsmasq udp0 0 0.0.0.0:53 0.0.0.0:* 0 1701252 12137/dnsmasq udp6 0 0 :::53 :::*0 1701255 12137/dnsmasq netstat: no support for `AF IPX' on this system. netstat: no support for `AF AX25' on this system. netstat: no support for `AF X25' on this system. netstat: no support for `AF NETROM' on this system. So whats wrong here? Has dnsmasq problems with interfaces named p1p1, p2p1 etc. ? Tfh! Oliver ___ 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
[Dnsmasq-discuss] IPv6 dhcp/ra-issue
Hi list, Im trying to give my network-computers IPv6-Addresses constructed from ppp0. In my config I get from my provider i.e. these (dynamic) IPv4 and IPv6-addresses: # ifconfig ppp0 ppp0: flags=4305UP,POINTOPOINT,RUNNING,NOARP,MULTICAST mtu 1492 inet 80.137.126.83 netmask 255.255.255.255 destination 87.186.224.66 inet6 fe80::43c:5b54:cea:b7ea prefixlen 10 scopeid 0x20link inet6 2003:62:487f:b168:43c:5b54:cea:b7ea prefixlen 64 scopeid 0x0global ppp txqueuelen 3 (Punkt-zu-Punkt Verbindung) RX packets 2546359 bytes 3258224683 (3.0 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1550070 bytes 133189854 (127.0 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 One of my additional interfaces has this address: # ifconfig p3p1 p3p1: flags=4163UP,BROADCAST,RUNNING,MULTICAST mtu 1500 inet 192.168.2.254 netmask 255.255.255.0 broadcast 192.168.2.255 inet6 fe80::210:f3ff:fe07:f7bf prefixlen 64 scopeid 0x20link ether 00:10:f3:07:f7:bf txqueuelen 1000 (Ethernet) RX packets 2806761 bytes 3337921408 (3.1 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1832066 bytes 326375284 (311.2 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 If I understand right, ive got an IPv6-subnet with the ability of ~250 clients (Telekom Germany), directly addressable from internet. Now i want to configure dnsmasq in a way, that the clients get IPv4- (works, internal only) and IPv6-addresses in a from internet addressable way. Imho the fe80.. number is the *router*-ipv6-address, the 2003:... the *host* ipv6-address. Now my clients should also get an ipv6-router *and* -host address. Is this right? My dnsmasq.conf (stripped): except-interface=ppp0 dhcp-range=set:gw2,192.168.2.50,192.168.2.150,255.255.255.0,12h dhcp-range=tag:gw2,::,constructor:ppp0 ddhcp-option=tag:gw2,128,192.168.2.254 enable-ra dhcp-option=mtu,1492 dhcp-option=option6:dns-server,[::] dhcp-option=252,http://heimserver/wpad.dat; log-queries log-dhcp Now I would assume, that my clientpc (p3p1 is bridged with wlan-ap) would get an fe80:.. and another, from internet routable address. While my card has the mac-address 00:21:6a:37:3f:72, i would assume getting an IPv6 address like 2003:62:487f:b168:0021:6aFF:FE373f:72, but he doesnt: wlan0 on my client-pc: # ifconfig wlan0 wlan0 Link encap:Ethernet Hardware Adresse 00:21:6a:37:3f:72 inet Adresse:192.168.2.100 Bcast:192.168.2.255 Maske:255.255.255.0 inet6-Adresse: fe80::221:6aff:fe37:3f72/64 Gültigkeitsbereich:Verbindung UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1 RX-Pakete:2981577 Fehler:0 Verloren:0 Überläufe:0 Fenster:0 TX-Pakete:2979080 Fehler:0 Verloren:0 Überläufe:0 Träger:0 Kollisionen:0 Sendewarteschlangenlänge:1000 RX-Bytes:3059635559 (3.0 GB) TX-Bytes:2883630423 (2.8 GB) Here /var/log/syslog on my client (sorry for the german parts): Apr 21 14:57:29 hp dhclient: DHCPREQUEST of 192.168.2.100 on wlan0 to 255.255.255.255 port 67 (xid=0x48327e63) Apr 21 14:57:29 hp dhclient: DHCPACK of 192.168.2.100 from 192.168.2.254 Apr 21 14:57:29 hp dhclient: bound to 192.168.2.100 -- renewal in 21016 seconds. Apr 21 14:57:29 hp dhclient: DHCPACK of 192.168.2.100 from 192.168.2.254 Apr 21 14:57:29 hp dhclient: bound to 192.168.2.100 -- renewal in 21016 seconds. Apr 21 14:57:29 hp NetworkManager[827]: info (wlan0): DHCPv4 state changed preinit - reboot Apr 21 14:57:29 hp NetworkManager[827]: info address 192.168.2.100 Apr 21 14:57:29 hp NetworkManager[827]: info prefix 24 (255.255.255.0) Apr 21 14:57:29 hp NetworkManager[827]: info gateway 192.168.2.254 Apr 21 14:57:29 hp NetworkManager[827]: info hostname 'hp' Apr 21 14:57:29 hp NetworkManager[827]: info nameserver '192.168.2.254' Apr 21 14:57:29 hp NetworkManager[827]: info Activation (wlan0) Stage 5 of 5 (IPv4 Configure Commit) scheduled... Apr 21 14:57:29 hp NetworkManager[827]: info Activation (wlan0) Stage 5 of 5 (IPv4 Commit) started... Apr 21 14:57:29 hp avahi-daemon[801]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.2.100. Apr 21 14:57:29 hp avahi-daemon[801]: New relevant interface wlan0.IPv4 for mDNS. Apr 21 14:57:29 hp avahi-daemon[801]: Registering new address record for 192.168.2.100 on wlan0.IPv4. Apr 21 14:57:30 hp NetworkManager[827]: info (wlan0): device state change: ip-config - secondaries (reason 'none') [70 90 0] Apr 21 14:57:30 hp NetworkManager[827]: info Activation (wlan0) Stage 5 of 5 (IPv4 Commit) complete. Apr 21 14:57:30 hp NetworkManager[827]: info (wlan0): device state change: secondaries - activated (reason 'none') [90 100 0] Apr 21 14:57:30 hp NetworkManager[827]: info NetworkManager state is now CONNECTED_GLOBAL Apr 21 14:57:30 hp NetworkManager[827]: info Policy set 'WLAN-001F3FD648F9' (wlan0) as default for IPv4 routing and DNS.
Re: [Dnsmasq-discuss] IPv6 dhcp/ra-issue
Hi Stéphane! Am 21.04.2014 15:35, schrieb Stéphane Guedon: Le lundi 21 avril 2014, 15:28:30 Oliver Rath a écrit : [..]I don't understand many of what you say. But your setup looks like mine, and I wrote an article about that : http://www.22decembre.eu/2014/04/14/local-dns-setup-with-dnsmasq-nsd-and-unbound/ You may just have a quick look at it, maybe it will help you a bit ? Thanks for the link! At the moment i cant see the big difference between our configs. But maybe it is some more basicly? My ppp0 interface has the only routeable IPv6-address, the p3p1-Interface doesnt. Does it need a routeable address? If yes, which one should it be (according to ppp0)? Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Speed comparison dnsmasq - unbound?
Hi Rob, thank you for the extensive clarification of the disparity between dnsmasq and unbound. It wasnt clear to me that there are so big differences. Tfh! Oliver Am 16.02.2014 15:06, schrieb /dev/rob0: [..] ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Speed comparison dnsmasq - unbound?
Hi list, did somebody some speed comparison tests for the dns caching functionality between dnsmasq and unbound (http://unbound.net/)? Ive read that unbound is the fastest dns caching server including dnssec support, but I could imagine, that dnsmasq has the same speed (or better). Unbound is the new standard dns caching server in FreeBSD 10 and replaces bind. Just for interest. Regards Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] client-specific prefix possible on tftp-dir?
Hi list, is it possible to generate any client-specific prefix (mac, ip, etc.)? I.e.: client with mac 00-01-12-23-34-45 calls for a file dir.cfg, so he should get /opt/tftproot/00-01-12-23-34-45/dir.cfg Any hints? I didnt found any recent in the net. tFH! Regards, Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] IP - Mac relation instead of IP - Machine?
Hi List, Im using dnsmasq for offering IP-addresses to pxe-client, which chainloads undionly.kpxe from the ipxe-project. Unfortunatly the dnamasq gives different IP-addresses, depending of bios-pxe or ipxe is asking. Is it possible, to bind the relationship of IPs only to mac? NB: I dont want to have a _fix_ scheme, which i have to include by hand; I want, that the dnsmasq gives forever the IP, which he gave at the first time. Is this possible? Tfh! Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] pxe only information from dnsmasq possible?
Hi Nikolay! Am 15.12.2012 16:26, schrieb Nikolay Kasatkin: Hello, Oliver! Yes, you can direct dnsmasq for sending only PXE information to your clients. Take a look at dhcp-proxy option in manual and config file. Ha! This is it! I simply have to use the proxy-keyword in the dhcp-range-option. While my dnsmasq-computer _then_ is getting also an ip-address (i think so), am I able to use the proxy option without a range? Or do I have to create he dnsmasq-configuration dynamicly by parsing the received ip-address? I will try this. Thank you so much! Oliver P.S.: Sorry for answering so lately, but christmas preparation was a bit chaotic this year .. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] pxe only information from dnsmasq possible?
Hi list, is it possible using dnsmasq only for offering pxe-boot-information (tftp-server, image name etc.)? I.e. following szenario: Computer with pxe-only-dnsmasq /\ || \/ Fritzbox with dhcp-Server /\ || \/ Client, who wants to boot via pxe from Computer above Now, if Client sends dhcp-request, Fritzbox is sending dhcp-Information, but no pxe-issues. Can this be done additionally from the first computer? Maybe its only an understanding problem from my side. Tfh! Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] tftp of multiple files from a directory?
Hi list, during looking for a solution, how I could transfer a tftp file composed from multiple little files, Ive got an idea: Normally a tftp-request must point to a regular file or link. If now the target would be a directory (instead of a file), so the logic could be: take all files located in this directory and send it via tftp as one file, taken in alphabetical order. This would be a nice feature for me. Anybody interested? Regards, Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] dynamic file generation for dnsmasq-tftp?
Hi list, Im brooding over the problem, that dnsmasq should send via tftp a file which would be generated at aquisition-time. I.e. if a tftp-request comes to dnsmasq, normally the tftp-part takes the named file and send it to the clent. If I now have a file, which consists of i.e. four parts, where one part is generated dynamicly, so that i could send it via p1,p2,p3,pdynamic,p4 at which the first three parts are really big ( 300MB), the rest is relativly small (10MB), so copying together takes really a lot of time and space. Is there a possibility to send such a thing via dnsmasq-tftp in a dynamic way? Maybe there is a generic possibility in linux like named pipes or binary overlay, but Im in the dark at the moment. Any ideas? Tfh! Regards, Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] standard gateway as Forwarding DNS-ip?
Hi list, my dnsmasq doesnt forward DNS-queries correctly. The goal is, that dnsmasq takes the standard-gateway of dhcp as forwarding address for dns-requests. But this didnt work here. If I put an additional dns-server in /var/run/dnsmasq/resolv.conf, it runs fine, but this is not the right way, because i dont know at starttime the name of my standard-gateway. Whats wrong? I have a simple configuration here for dnsmasq: -- except-interface=wlan0 dhcp-range=192.168.97.50,192.168.97.150,255.255.255.0,12h log-queries -- Starting the dnsmasq creates the folloiwing entry in /etc/resolv.conf: -- # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1 -- The server hast the ipadress 192.168.11.254 (eth0) and (should) forward to 192.168.172.1 via wlan0 -- # route -n Kernel-IP-Routentabelle Ziel Router Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.172.1 0.0.0.0 UG 0 0 0 wlan0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0 192.168.97.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.172.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0 -- Now the forwarding is finished by setting forwarding parameter and Masquerading rule: -- # cat /proc/sys/net/ipv4/ip_forward 1 # iptables -t nat -L [..] Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE all -- anywhere anywhere -- Here the starting log: -- May 18 13:58:14 dnsmasq[3092]: last message repeated 7 times May 18 13:58:14 dmi-ThinkPad-T500 dnsmasq[3092]: reading /var/run/dnsmasq/resolv.conf May 18 13:58:14 dmi-ThinkPad-T500 dnsmasq[3092]: ignoring nameserver 127.0.0.1 - local interface May 18 13:58:14 dmi-ThinkPad-T500 dnsmasq[3092]: exiting on receipt of SIGTERM May 18 13:58:16 dmi-ThinkPad-T500 dnsmasq[3182]: started, version 2.59 cachesize 150 May 18 13:58:16 dmi-ThinkPad-T500 dnsmasq[3182]: compile time options: IPv6 GNU-getopt DBus i18n DHCP TFTP conntrack IDN May 18 13:58:16 dmi-ThinkPad-T500 dnsmasq-dhcp[3182]: DHCP, IP range 192.168.97.50 -- 192.168.97.150, lease time 12h May 18 13:58:16 dmi-ThinkPad-T500 dnsmasq-tftp[3182]: TFTP root is /opt/dmi/tftproot May 18 13:58:16 dmi-ThinkPad-T500 dnsmasq[3182]: reading /var/run/dnsmasq/resolv.conf May 18 13:58:16 dmi-ThinkPad-T500 dnsmasq[3182]: ignoring nameserver 127.0.0.1 - local interface May 18 13:58:16 dmi-ThinkPad-T500 dnsmasq[3182]: /etc/hosts lesen – 7 Adressen -- here an dns-request example: -- May 18 13:59:00 dmi-ThinkPad-T500 dnsmasq[3182]: reading /var/run/dnsmasq/resolv.conf May 18 13:59:00 dmi-ThinkPad-T500 dnsmasq[3182]: ignoring nameserver 127.0.0.1 - local interface May 18 13:59:00 dmi-ThinkPad-T500 dnsmasq[3182]: query[A] heise.de from 192.168.97.73 -- Tfh! Regards Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] test --tftp-lowercase
Hi Simon, ive tested the tftp-lowercase option - runs fine as option in dnsmasq.conf - runs fine as direct -- parameter on command line Unfortunatly the status-line (lowercase) is lost (line 637-640 in dnsmasq.c). Regards, Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] tolower() ist better
Hi Simon, i didnt know, that there is a C-standard-function tolower for doing this. Thanks for correction! Cheers Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Update: Lowercase patch for 2.61rc2
Hi Simon, Am 18.04.2012 17:31, schrieb Simon Kelley: [.. ]Dumb question: you're recommending using lowntfs-3g, but that has an ignore-case mount option. Doesn't that solve the problem without having to make changes to dnsmasq? You are right, I could use this option for solving my problem if i could use lowntfs as destination source for tftp-client-request. But unfortunatly its not so easy: My personal main focus for the --tftp-lowercase option was using it with linux-ris (http://oss.netfarm.it/guides/ris-linux.php) BINL-services, but I thought, this would be to special for writing it in the manpage. I use lowntfs for _copying_ driver from a ntfs-source to my driver-directory (i.e. ext4). Because I have lots of different sources for driver files, there are different ways getting all files to lowercase. The main problem of this sources is, that often filenames are used with uppercase inside without need (probably for signing different version of drivers without offering a version number), so getting this files via tftp will fail. This i found on xp-cds, too. So i created a pool with lots of drivers, all lowercase, so there is no problem transferring it via tftp (of dnsmasq) using this option. Now you can say: Ok, why you dont use a partition with the ignore_case-Option holding all this drivers? This is right unless you are working on embedded environment with low space. There it is much smarter using the lowercase-option than creating an additional partition. If you like, i can add some use cases like this to manpage, so people could find it useful. But if you think, this shouldnt get into dnsmasq, i have no problem with this because i can patch and compile dnsmasq for myself. That is the fine thing of Open Source. :-) For the tftp-code there are two open questions for me: 1. What happens, if there are special characters in the path (like spaces, oder ;)? 2. What will happen, if there are utf8 or utf16 charactars in the path (will happen in non-latin environments)? Regards, Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] in addition [Re: Update: Lowercase patch for 2.61rc2]
Hi Simon, Am 20.04.2012 22:30, schrieb Simon Kelley: 2.61rc3 is there now. Oliver, please check I've not broken your work. For the first: in the CHANGELOG Its the --tftp-lowercase option, not the --dhcp-lowercase option ;-) Will test the rc as soon as possible. Regards, Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] In addition [was tftp request conversion \ - / ? lowercase?
Am 16.04.2012 23:09, schrieb Simon Kelley: On 16/04/12 14:06, Oliver Rath wrote: Hi list, i found a patch on the list in 2009: http://lists.thekellehttp://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2009q2/003050.htmlys.org.uk/pipermail/dnsmasq-discuss/2009q2/003050.html Maybe it can be combined with my option-name idea below? That patch, or its functional equivalent, went into dnsmasq 2.51. Cheers, Simon. Oh, thank you! I didnet realize this. Have looked for it, but didnt find it. So, if someone uses \ as real part of his filenames, they will be converted, too ;-) Regards, Oliver ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Lowercase patch
Hi list, ive created a patch for introducing the --tftp-lowercase option in addition, you can use tftp-lowercase in dnsmasq.conf for converting tftp-requests to lowercase. If you find it useful, feel free to include it in the next release. Regards, Oliver diff -u -r -N dnsmasq-2.60/man/dnsmasq.8 dnsmasq-2.60+locase/man/dnsmasq.8 --- dnsmasq-2.60/man/dnsmasq.8 2012-03-04 21:04:22.0 +0100 +++ dnsmasq-2.60+locase/man/dnsmasq.8 2012-04-17 12:04:50.454773235 +0200 @@ -1299,6 +1299,12 @@ enabled, and certainly not without specifying --tftp-root. Doing so can expose any world-readable file on the server to any host on the net. .TP +.B --tftp-lowercase +Enable converting filenames of TFTP-requests to lowercase. This is useful +if you are having Request from MS-Windows (c) clients, because requests +on ntfs, vfat and iso from these are case-insensitive, but Linux does. +This works great together i.e. with the mount -t lowntfs-3g .. command. +.TP .B --tftp-max=connections Set the maximum number of concurrent TFTP connections allowed. This defaults to 50. When serving a large number of TFTP connections, diff -u -r -N dnsmasq-2.60/src/dnsmasq.c dnsmasq-2.60+locase/src/dnsmasq.c --- dnsmasq-2.60/src/dnsmasq.c 2012-03-04 21:04:22.0 +0100 +++ dnsmasq-2.60+locase/src/dnsmasq.c 2012-04-17 12:20:08.395324986 +0200 @@ -584,11 +584,12 @@ max_fd = FD_SETSIZE; #endif - my_syslog(MS_TFTP | LOG_INFO, TFTP %s%s %s, + my_syslog(MS_TFTP | LOG_INFO, TFTP %s%s %s%s, daemon-tftp_prefix ? _(root is ) : _(enabled), daemon-tftp_prefix ? daemon-tftp_prefix: , - option_bool(OPT_TFTP_SECURE) ? _(secure mode) : ); - + option_bool(OPT_TFTP_SECURE) ? _(secure mode) : , + option_bool(OPT_TFTP_LOCASE) ? _((lowercase-mode)) : ); + /* This is a guess, it assumes that for small limits, disjoint files might be served, but for large limits, a single file will be sent to may clients (the file only needs diff -u -r -N dnsmasq-2.60/src/dnsmasq.h dnsmasq-2.60+locase/src/dnsmasq.h --- dnsmasq-2.60/src/dnsmasq.h 2012-03-04 21:04:22.0 +0100 +++ dnsmasq-2.60+locase/src/dnsmasq.h 2012-04-17 11:21:05.151173253 +0200 @@ -217,7 +217,8 @@ #define OPT_CONNTRACK 35 #define OPT_FQDN_UPDATE36 #define OPT_RA 37 -#define OPT_LAST 38 +#define OPT_TFTP_LOCASE38 +#define OPT_LAST 39 /* extra flags for my_syslog, we use a couple of facilities since they are known not to occupy the same bits as priorities, no matter how syslog.h is set up. */ diff -u -r -N dnsmasq-2.60/src/option.c dnsmasq-2.60+locase/src/option.c --- dnsmasq-2.60/src/option.c 2012-03-04 21:04:22.0 +0100 +++ dnsmasq-2.60+locase/src/option.c 2012-04-17 12:15:07.621833536 +0200 @@ -64,57 +64,58 @@ #define OPTSTRING 951yZDNLERKzowefnbvhdkqr:m:p:c:l:s:i:t:u:g:a:x:S:C:A:T:H:Q:I:B:F:G:O:M:X:V:U:j:P:J:W:Y:2:4:6:7:8:0:3: /* options which don't have a one-char version */ -#define LOPT_RELOAD256 -#define LOPT_NO_NAMES 257 -#define LOPT_TFTP 258 -#define LOPT_SECURE259 -#define LOPT_PREFIX260 -#define LOPT_PTR 261 -#define LOPT_BRIDGE262 -#define LOPT_TFTP_MAX 263 -#define LOPT_FORCE 264 -#define LOPT_NOBLOCK 265 -#define LOPT_LOG_OPTS 266 -#define LOPT_MAX_LOGS 267 -#define LOPT_CIRCUIT 268 -#define LOPT_REMOTE269 -#define LOPT_SUBSCR270 -#define LOPT_INTNAME 271 -#define LOPT_BANK 272 -#define LOPT_DHCP_HOST 273 -#define LOPT_APREF 274 -#define LOPT_OVERRIDE 275 -#define LOPT_TFTPPORTS 276 -#define LOPT_REBIND277 -#define LOPT_NOLAST278 -#define LOPT_OPTS 279 -#define LOPT_DHCP_OPTS 280 -#define LOPT_MATCH 281 -#define LOPT_BROADCAST 282 -#define LOPT_NEGTTL283 -#define LOPT_ALTPORT 284 -#define LOPT_SCRIPTUSR 285 -#define LOPT_LOCAL 286 -#define LOPT_NAPTR 287 -#define LOPT_MINPORT 288 -#define LOPT_DHCP_FQDN 289 -#define LOPT_CNAME 290 -#define LOPT_PXE_PROMT 291 -#define LOPT_PXE_SERV 292 -#define LOPT_TEST 293 -#define LOPT_TAG_IF294 -#define LOPT_PROXY 295 -#define LOPT_GEN_NAMES 296 -#define LOPT_MAXTTL297 -#define LOPT_NO_REBIND 298 -#define LOPT_LOC_REBND 299 -#define LOPT_ADD_MAC 300 -#define LOPT_DNSSEC301 -#define LOPT_INCR_ADDR 302 -#define LOPT_CONNTRACK 303 -#define LOPT_FQDN 304 -#define LOPT_LUASCRIPT 305 -#define LOPT_RA306 +#define LOPT_RELOAD 256 +#define LOPT_NO_NAMES257 +#define LOPT_TFTP258 +#define LOPT_SECURE 259 +#define LOPT_PREFIX 260 +#define LOPT_PTR 261 +#define LOPT_BRIDGE 262 +#define LOPT_TFTP_MAX263 +#define LOPT_FORCE 264 +#define LOPT_NOBLOCK 265 +#define LOPT_LOG_OPTS266 +#define LOPT_MAX_LOGS267 +#define LOPT_CIRCUIT 268 +#define LOPT_REMOTE 269 +#define LOPT_SUBSCR 270 +#define LOPT_INTNAME 271 +#define LOPT_BANK272 +#define LOPT_DHCP_HOST 273 +#define LOPT_APREF 274 +#define LOPT_OVERRIDE275
[Dnsmasq-discuss] Update: Lowercase patch for 2.61rc2
Hi list, here is the version for the 2nd release candidate dnsmasq-2.61rc2. My first patch was built against 2.60. Have fun! Regards, Oliver diff -u -r dnsmasq-2.61rc2/man/dnsmasq.8 dnsmasq-2.61rc2+locase/man/dnsmasq.8 --- dnsmasq-2.61rc2/man/dnsmasq.8 2012-04-16 18:26:19.0 +0200 +++ dnsmasq-2.61rc2+locase/man/dnsmasq.8 2012-04-17 16:41:44.917242903 +0200 @@ -1385,6 +1385,13 @@ enabled, and certainly not without specifying --tftp-root. Doing so can expose any world-readable file on the server to any host on the net. .TP +.B --tftp-lowercase +Enable converting filenames of TFTP-requests to lowercase. This is useful +if you are having requests from MS-Windows (c) tftp-clients, because they +require case-insensitive destinations. +This works great together i.e. with the mount -t lowntfs-3g .. command. +Furthermore, dnsmasq-tftp converts \\ to / per default. +.TP .B --tftp-max=connections Set the maximum number of concurrent TFTP connections allowed. This defaults to 50. When serving a large number of TFTP connections, diff -u -r dnsmasq-2.61rc2/src/dnsmasq.c dnsmasq-2.61rc2+locase/src/dnsmasq.c --- dnsmasq-2.61rc2/src/dnsmasq.c 2012-04-16 18:26:19.0 +0200 +++ dnsmasq-2.61rc2+locase/src/dnsmasq.c 2012-04-17 15:19:49.977448358 +0200 @@ -634,11 +634,12 @@ max_fd = FD_SETSIZE; #endif - my_syslog(MS_TFTP | LOG_INFO, TFTP %s%s %s, + my_syslog(MS_TFTP | LOG_INFO, TFTP %s%s %s%s, daemon-tftp_prefix ? _(root is ) : _(enabled), daemon-tftp_prefix ? daemon-tftp_prefix: , - option_bool(OPT_TFTP_SECURE) ? _(secure mode) : ); - + option_bool(OPT_TFTP_SECURE) ? _(secure mode) : , + option_bool(OPT_TFTP_LOCASE) ? _((lowercase-mode)) : ); + /* This is a guess, it assumes that for small limits, disjoint files might be served, but for large limits, a single file will be sent to may clients (the file only needs diff -u -r dnsmasq-2.61rc2/src/dnsmasq.h dnsmasq-2.61rc2+locase/src/dnsmasq.h --- dnsmasq-2.61rc2/src/dnsmasq.h 2012-04-16 18:26:19.0 +0200 +++ dnsmasq-2.61rc2+locase/src/dnsmasq.h 2012-04-17 16:32:29.577266117 +0200 @@ -217,7 +217,8 @@ #define OPT_CONNTRACK 35 #define OPT_FQDN_UPDATE36 #define OPT_RA 37 -#define OPT_LAST 38 +#define OPT_TFTP_LOCASE38 +#define OPT_LAST 39 /* extra flags for my_syslog, we use a couple of facilities since they are known not to occupy the same bits as priorities, no matter how syslog.h is set up. */ diff -u -r dnsmasq-2.61rc2/src/option.c dnsmasq-2.61rc2+locase/src/option.c --- dnsmasq-2.61rc2/src/option.c 2012-04-16 18:26:19.0 +0200 +++ dnsmasq-2.61rc2+locase/src/option.c 2012-04-17 16:41:57.037242396 +0200 @@ -64,59 +64,60 @@ #define OPTSTRING 951yZDNLERKzowefnbvhdkqr:m:p:c:l:s:i:t:u:g:a:x:S:C:A:T:H:Q:I:B:F:G:O:M:X:V:U:j:P:J:W:Y:2:4:6:7:8:0:3: /* options which don't have a one-char version */ -#define LOPT_RELOAD256 -#define LOPT_NO_NAMES 257 -#define LOPT_TFTP 258 -#define LOPT_SECURE259 -#define LOPT_PREFIX260 -#define LOPT_PTR 261 -#define LOPT_BRIDGE262 -#define LOPT_TFTP_MAX 263 -#define LOPT_FORCE 264 -#define LOPT_NOBLOCK 265 -#define LOPT_LOG_OPTS 266 -#define LOPT_MAX_LOGS 267 -#define LOPT_CIRCUIT 268 -#define LOPT_REMOTE269 -#define LOPT_SUBSCR270 -#define LOPT_INTNAME 271 -#define LOPT_BANK 272 -#define LOPT_DHCP_HOST 273 -#define LOPT_APREF 274 -#define LOPT_OVERRIDE 275 -#define LOPT_TFTPPORTS 276 -#define LOPT_REBIND277 -#define LOPT_NOLAST278 -#define LOPT_OPTS 279 -#define LOPT_DHCP_OPTS 280 -#define LOPT_MATCH 281 -#define LOPT_BROADCAST 282 -#define LOPT_NEGTTL283 -#define LOPT_ALTPORT 284 -#define LOPT_SCRIPTUSR 285 -#define LOPT_LOCAL 286 -#define LOPT_NAPTR 287 -#define LOPT_MINPORT 288 -#define LOPT_DHCP_FQDN 289 -#define LOPT_CNAME 290 -#define LOPT_PXE_PROMT 291 -#define LOPT_PXE_SERV 292 -#define LOPT_TEST 293 -#define LOPT_TAG_IF294 -#define LOPT_PROXY 295 -#define LOPT_GEN_NAMES 296 -#define LOPT_MAXTTL297 -#define LOPT_NO_REBIND 298 -#define LOPT_LOC_REBND 299 -#define LOPT_ADD_MAC 300 -#define LOPT_DNSSEC301 -#define LOPT_INCR_ADDR 302 -#define LOPT_CONNTRACK 303 -#define LOPT_FQDN 304 -#define LOPT_LUASCRIPT 305 -#define LOPT_RA306 -#define LOPT_DUID 307 -#define LOPT_HOST_REC 308 +#define LOPT_RELOAD 256 +#define LOPT_NO_NAMES257 +#define LOPT_TFTP258 +#define LOPT_SECURE 259 +#define LOPT_PREFIX 260 +#define LOPT_PTR 261 +#define LOPT_BRIDGE 262 +#define LOPT_TFTP_MAX263 +#define LOPT_FORCE 264 +#define LOPT_NOBLOCK 265 +#define LOPT_LOG_OPTS266 +#define LOPT_MAX_LOGS267 +#define LOPT_CIRCUIT 268 +#define LOPT_REMOTE 269 +#define LOPT_SUBSCR 270 +#define LOPT_INTNAME 271 +#define LOPT_BANK272 +#define LOPT_DHCP_HOST 273 +#define LOPT_APREF 274 +#define LOPT_OVERRIDE
[Dnsmasq-discuss] In addition [was tftp request conversion \ - / ? lowercase?
Hi list, i found a patch on the list in 2009: http://lists.thekellehttp://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2009q2/003050.htmlys.org.uk/pipermail/dnsmasq-discuss/2009q2/003050.html Maybe it can be combined with my option-name idea below? TfH! Oliver Am 16.04.2012 11:13, schrieb Oliver Rath: Hi list, i have here some requests from windows server, which are unfortunatly sending requests like this: \srv\tftp\Boot\... etc. On linux, i have to convert these requests to srv/tftp/Boot (or even better srv/tftp/boot in lowercase) This is possible with in-tftpd or tftp-hpa (you can convert characters by a list). Is something like this possible in dnsmasq tftp service? If not, maybe a lot of people could find it useful. I.E. i could image options like tftp-convert-backslash-to-slash and tftp-convert-to-lowercase Tfh! Oliver ___ 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