:: Re: [DNG] hijacking resolv.conf - p…
Top Page
Delete this message
Reply to this message
Author: Nick
Date:  
To: dng
Subject: Re: [DNG] hijacking resolv.conf - possible fix?
On 11-04-2025 07:35, Alexandros Prekates via Dng 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
>
> 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)
>
> I say strangely because when i start my vm with:
> $ qemu-system-x86_64 -enable-kvm -m 2048 -nic
> user,model=virtio -drive
> file=devuanstable.qcow2,media=disk,if=virtio -monitor stdio
>
> Now if i changed to 8.8.8.8 it will work!
>
> Alexandros.
> ______________


When I read the documentation correctly there are two different parameters:

-net nic,model=virtio

 and

 -net user,dns=8.8.8.8