:: Re: [DNG] hijacking resolv.conf - p…
Inizio della pagina
Delete this message
Reply to this message
Autore: Dan Purgert
Data:  
To: dng
Oggetto: Re: [DNG] hijacking resolv.conf - possible fix?
On Apr 09, 2025, Alexandros Prekates wrote:
> On Wed, 9 Apr 2025 04:56:43 -0400
> Dan Purgert via Dng <dng@???> wrote:
>
>
> > >
> > > Devuan on qemu with user network backend has /etc/resolv.conf set
> > > to 10.0.2.3 (DNS) . That doesnt work. When i changed it to 8.8.8.8
> > > or 10.0.2.2 (host) both worked. But at reboot /etc/resolv.conf again
> > > it was set to 10.0.2.3.
> >
> > Fix your DHCP server, so it's not handing out incorrect DNS Server
> > info
> >
>
> Thanks your advice. Is there a guide on how to troubleshoot dns and
> fix possibly incorrect dns server info ?


Depends on how you're configuring the netdev in qemu.

I primarily bridge the virtual hosts directly to the physical LAN (or,
well, a VLAN on it), so everything is managed directly on my primary
DHCP server (isc-dhcp-server ... I really gotta look into kea). On rare
occasions, I'll spin up a VM with private networking on the
daily-driver, but I think it still "technically" uses one of the 'tap'
device options, where the laptop itself just runs a DNS relay (a lot
like the basic setup of a residential all-in-one gateway, like from your
ISP).

If you're just using the slirp (user-level) method, then you need to
override the default dns server(s) as part of the host invocation, like
this:

-netdev user,[...],dns=8.8.8.8, dns=8.8.4.4



--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860