:: Re: [DNG] hijacking resolv.conf - p…
Top Page
Delete this message
Reply to this message
Author: Dan Purgert
Date:  
To: dng
Subject: Re: [DNG] hijacking resolv.conf - possible fix?
On Apr 11, 2025, Alexandros Prekates wrote:
> On Wed, 9 Apr 2025 06:39:20 -0400
> Dan Purgert via Dng <dng@???> wrote:
>
>
> >
> > 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
> >
>
> I tried (both with static and dynamic ip):
> $ qemu-system-x86_64 -enable-kvm -m 2048 -nic
> user,dns=8.8.8.8,model=virtio -drive
> file=devuanstable.qcow2,media=disk,if=virtio -monitor stdio


I'm not sure if "-nic" does anything funny compared to the split
'-netdev' and '-device' route. Manpage implies it's identical, but
they've been known to be wrong ;)

>
> Although resolv.conf was set to 8.8.8.8 strangely that didnt work. If i
> changed to 10.0.2.2 it will work.(by work i mean my internet testing
> with $sudo tracerout devuan.org)


Better test would be 'nslookup' or 'dig', so that you can verify what
DNS it's actually querying. Maybe couple it with tcpdump.

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