Re: [Dnsmasq-discuss] DNSMASQ on Ubuntu VirtualBox.

2023-03-22 Thread Petr Menšík
Have you checked the contents of /etc/hosts file? Sometimes the local 
hostname is added there to save resolution of local hostname again and 
again. Could its record override address= you wanted to assign? I doubt 
there is defined and documented order if they conflict.


Does you /etc/hosts contain:

127.0.0.1 localhost xxx  ?

it might help if you remove expand-hosts from dnsmasq configuration and 
use aliases in the file itself. But avoid conflicting definition with 
dnsmasq. Consider also using host-record, which will match only 
xxx.mydomain.com, not example.xxx.mydomain.com.


Cheers,
Petr

On 3/20/23 18:15, Paul Constantine wrote:

So here is my DNSMASQ problem.
I'm running to VirtualBox Ubuntu 16.04 servers on two seperate 2011 
mac mini servers (macos High Sierra).
Each of the two VirtualBox Ubuntu servers runs a LAMP website (Drupal 
based) and a DNSMASQ dns server.
The network is controlled by a Fritz!Box 7590. In the configuration 
the two different DNSMASQ servers are listed instead of the standard 
provider DNS.

VirtualBox One:
    static IP     192.168.2.50
    website IP     192.168.2.50    xxx.mydomain.com
    DNSMASQ IP     192.168.2.50
VirtualBox Two:
    static IP     192.168.2.55
    website IP     192.168.2.55    yyy.mydomain.com
    DNSMASQ IP     192.168.2.55
Fritz!Box (router)
    Gateway        192.168.2.1
    DHCP        192.168.2.100-200
So far so good. This setup seemed to have worked for hals a year. Then 
recently I had to restore one of the VirtualBox servers. And now it 
only works somewhat. In short:
Each of the two DNSMASQ servers will only resolve the website on the 
other VirtualBox, the website on the same VirtualBox will resolve to 
localhost.
So if I want to be able to reach the domain in VirtualBox One I have 
to use the DNSMASQ server in VirtualBox Two and the other way around.
Here is the dnsmasq.conf file from VirtalBox Two (for Box One just 
substitute the 192.168.2.50 for 192.168.2.55).

cat /etc/dnsmasq.conf

# DNS configuration
port=53
#/etc/dnsmasq.conf
domain-needed
bogus-priv
expand-hosts

# The address 192.168.2.55 is the static IP of this server
# You can find this ip by running ifconfig and look for the
# IP of the interface which is connected to the router.
listen-address=127.0.0.1
listen-address=192.168.2.55
bind-interfaces

# Use open source DNS servers
server=8.8.8.8
server=8.8.4.4

# Create custom 'domains'.
# Custom 'domains' can also be added in /etc/hosts
address=/xxx.mydomain.com/192.168.2.50
address=/yyy.mydomain.com/192.168.2.55
# address=/www.anotherdomain.com/192.168.2.50
# address=/anotherdomain.com/192.168.2.50
# address=/www.stillanotherdomain.ch/192.168.2.50
# address=/stillanotherdomain.ch/192.168.2.50

I am not very experienced with DNS servers, so can you possible point 
me in the right direction if you see an error.

Thanks
Paul


--
Petr Menšík
Software Engineer, RHEL
Red Hat,https://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] "reply query is duplicate" failure

2023-03-22 Thread Manish Shakya
Hi there,

I am using v2.89 dnsmasq with openwrt. Evenever dnsmasq shows the following
logs, the getaddrinfo() function fails and has to be retried.

Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 45 127.0.0.1/46942
query[A] alpha.wirelessneovi.com from 127.0.0.1
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 45 127.0.0.1/46942
forwarded alpha.wirelessneovi.com to 10.14.159.231
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 46 ::1/46942 query[A]
alpha.wirelessneovi.com from ::1
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 47 127.0.0.1/46942
query[] alpha.wirelessneovi.com from 127.0.0.1
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 47 127.0.0.1/46942
forwarded alpha.wirelessneovi.com to 10.14.159.231
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 47 127.0.0.1/46942 reply
alpha.wirelessneovi.com is NODATA-IPv6
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 48 ::1/46942 query[]
alpha.wirelessneovi.com from ::1
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 48 ::1/46942 forwarded
alpha.wirelessneovi.com to 10.14.159.231
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 48 ::1/46942 reply
alpha.wirelessneovi.com is NODATA-IPv6
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 45 127.0.0.1/46942 reply
alpha.wirelessneovi.com is 45.27.190.129
Wed Mar 22 20:54:41 2023 daemon.info dnsmasq[1]: 46 ::1/46942 reply query
is duplicate

What am I doing wrong here? Am I missing any parameters? Any help is
appreciated.

-- 
Regards,
Manish Shakya
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss