[HELP NEEDED] Network tweaks

Hi!

I have some issues with free wifi in mu hotel. I wanna hide my MAC (to prevent tracking) and encrypt DNS (to prevent dns spoofing, which extremely easy on open networks)

On phone it solved via encrypted DNS and changing MAC (it is Android phone).

So… I have linux mint 22. Asus TUF A15.
And I read that I just need to add this to make my MAC random, right?

/etc/NetworkManager/NetworkManager.conf

[device]
wifi.scan-rand-mac-address=yes

[connection]
ethernet.cloned-mac-address=random
wifi.cloned-mac-address=random

And to encrypt DNS:

/etc/systemd/resolved.conf

DNS=1.1.1.1
DNSOverTLS=yes

Please help me as I am too afraid to test it myself as it is my only working laptop now with me. And if something will go wrong I will be doomed as backups in thousands of miles away

Check your current MAC, something like:

ip link show | grep -A 1 "wlan"

Where wlan is your wireless interface.

enable random MAC addressing as per your original post. Restart networking eg.

sudo systemctl restart NetworkManager

and check your mac address again. set /etc/systemd/resolved.conf as per your post. Restart and check:

$ sudo systemctl restart systemd-resolved
$ resolvectl status

The output should be yes.

Connect Wifi and visit https://1.1.1.1/help to check if everything is OK…

BTW: I do it differently, using mobile phone with GrapheneOS. GrapheneOS by default generates new MAC when connecting to any LAN. When connected with my phone than I simply create WiFi Hotspot and connect with my laptop. This way the MAC address from my laptop is only seen by my phone and noone else…