So I’m setting up a VPN VM using the walkthru provided by the folks at Mullvad
It’s all setup, everything works right, wg-quick connects and networking is flawless. I’m feeling pretty proud of my damn self except this one thing. The script will not auto run when the VM starts.
Here’s a little info about my build. I’m on the 4.2.0 rc1 I’m using the fedora-38 template.
After searing the forums I put a little echo test > /home/user/log line into the rc.local that runs just fine and writes to the home directory np, but when the VM boots wg-quick fails saying the conf file does not exist.
Jun 16 23:57:20 MullvadVPN systemd: Starting qubes-misc-post.service - Qubes misc post-boot actions... Jun 16 23:57:21 MullvadVPN misc-post.sh: wg-quick: `/home/user/se-sto-wg-008.conf' does not exist Jun 16 23:57:21 MullvadVPN systemd: qubes-misc-post.service: Main process exited, code=exited, status=1/FAILURE Jun 16 23:57:21 MullvadVPN systemd: qubes-misc-post.service: Failed with result 'exit-code'. Jun 16 23:57:21 MullvadVPN systemd: Failed to start qubes-misc-post.service - Qubes misc post-boot actions.
My rc.local looks like:
#!/bin/sh # This script will be executed at every VM startup, you can place your own # custom commands here. This includes overriding some configuration in /etc, # starting services etc. # Example for overriding the whole CUPS configuration: # rm -rf /etc/cups # ln -s /rw/config/cups /etc/cups # systemctl --no-block restart cups wg-quick up /home/user/se-sto-wg-008.conf
Ive tried pointing the command to /rw/home/user/se-sto-wg-008.conf and tried several other conf files with no positive result. But as soon as boot is complete the command will launch the wg tunnel right away.
I feel like I’m missing something super simple. If rc.local can write to the /home/user dir, then wtf cant it seem to read the files present there?
Any help would be appreciated.
EDIT: interesting to note… I made a launcher on the DOM0 desktop that runs:
qvm-run MullvadVPN sudo wg-quick up /home/user/se-sto-wg-008.conf
Which launches the qube and connects wg without ANY issue.