Server Fault Asked by TommyTheKid on January 3, 2022
I have a “sandbox” web server setup for my developers to work on. Each one has their own IP, with all the “production” hostnames configured, and a DNSmasq configuration to answer for those production names but to return their own IP, because its not reasonable to edit the “hosts” file on a TV or other appliance type device.
I have 8 dnsmasqd’s running on the server with configuration files that look like:
bind-interfaces
except-interface=lo
listen-address = 10.0.0.201
address=/www.mydomain.com/10.0.0.201
address=/ws.mydomain.com/10.0.0.201
address=/www.another.com/10.0.0.201
address=/ws.another.com/10.0.0.201
.. with each configuration file incremented (10.0.0.202, 10.0.0.203, etc)
While that part is working perfectly for the TV’s it is driving my a little crazy that I can’t test it from the server itself.
[root@sf-devstore-01 sandboxes]# host www.mydomain.com 10.0.0.201
;; connection timed out; trying next origin
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached
It works just fine from other hosts on the same network…
[root@sf-mon-01 ~]# host www.mydomain.com 10.0.0.201
Using domain server:
Name: 10.0.0.201
Address: 10.0.0.201#53
Aliases:
www.mydomain.com has address 10.0.0.201
This system is the only system on the network with the 10.0.0.20x IP addresses (I verified the MAC address). It is listening and the interfaces are “UP” (etc etc).. it works on other machines, just not the local system.
Any suggestions?
Thanks in advance,
Tommy
I have also solved the blocker by downgrading to dnsmasq-2.48-6.el6.x86_64.rpm without this lovely non-configurable feature.
Answered by OCTAGRAM on January 3, 2022
Tumbleweeds...
So, I googled around and found NOTHING, but decided to checkout the code and compile it myself to see what would happen, and it worked fine.
Interesting... So I checked out the same version of code that CentOS 6.5 distributes (2.48) and again it works. I am fairly certain that its related to the "compile time option" of "--bind-interfaces with SO_BINDTODEVICE"
.. I just did "make" with no options, and it works fine.
[root@app src]# ./dnsmasq -qdC /etc/sandbox-dnsmasq.d/tmcneely.dns
dnsmasq: started, version 2.48 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-I18N DHCP TFTP
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 10.0.2.3#53
dnsmasq: read /etc/hosts - 2 addresses
dnsmasq: query[A] www.shoptv.com from 10.250.251.201
dnsmasq: config www.shoptv.com is 10.250.251.201
dnsmasq: query[AAAA] www.shoptv.com from 10.250.251.201
dnsmasq: config www.shoptv.com is NODATA-IPv6
dnsmasq: query[MX] www.shoptv.com from 10.250.251.201
dnsmasq: config www.shoptv.com is NODATA
[root@app src]# /usr/sbin/dnsmasq -qdC /etc/sandbox-dnsmasq.d/tmcneely.dns
dnsmasq: started, version 2.48 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP "--bind-interfaces with SO_BINDTODEVICE"
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 10.0.2.3#53
dnsmasq: read /etc/hosts - 2 addresses
Answered by TommyTheKid on January 3, 2022
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP