Mullvad VPN Daemon issues

Everthing is working, lets wrap up:

In /etc/pve/lxc/{{ VMID }}.conf add:

Code:
lxc.mount.entry: /dev/net dev/net none bind,create=dir
lxc.mount.entry: /tmp/net-cls-v1 tmp/net-cls-v1 none bind,create=dir

On your Proxmox host do:

Code:
script=/root/pepare-mullvad-lxc.sh
servicename=pepare-mullvad-lxc
cat > $script <<EOF
#!/usr/bin/env bash
chown 100000:100000 /dev/net/tun
mkdir -p /tmp/net-cls-v1
mount -t cgroup -o net_cls none /tmp/net-cls-v1
chown -R 100000:100000 /tmp/net-cls-v1
EOF
chmod +x $script
cat > /etc/systemd/system/$servicename.service <<EOF
[Service]
ExecStart=$script
[Install]
WantedBy=default.target
EOF
systemctl enable $servicename
systemctl start $servicename

Now start the container and install Mullvad:

Code:
curl -sSL https://mullvad.net/download/app/deb/latest-beta/ --output /tmp/mullvad.deb
sudo apt install /tmp/mullvad.deb -y

Mullvad should now be working:
Code:
$ mullvad account login 1234567890
$ mullvad connect
$ mullvad status
Connected to se4-wireguard in Malmö, Sweden
$ curl https://am.i.mullvad.net/connected
You are connected to Mullvad (server se4-wireguard). Your IP address is 193.138.218.160

But there is a catch, pve seems to have trouble reaching unified cgroupe now:
can't open '/sys/fs/cgroup/memory/lxc/XXX/ns/memory.stat' - No such file or directory (500)
 
Last edited:
I followed the steps you mentioned above, and yes I do have that catch but can still connect to the console etc.

The issue I am now having is that the container cannot connect to the internet and when I type 'ping 1.1.1.1' for example, I get this error:

From 192.168.1.240 icmp_seq=1 Destination Port Unreachable
ping: sendmsg: Operation not permitted

Does anyone have any idea why this is happening? It is only on one container and the other connect to the internet fine.

Thanks in advance.
 
Looks like mullvad is not connected and is blocking your connection.
What did mullvad status say?

Also try starting the daemon directly and monitor the output:
Code:
sudo /opt/Mullvad\ VPN/resources/mullvad-daemon -v
 
Looks like mullvad is not connected and is blocking your connection.
What did mullvad status say?

Also try starting the daemon directly and monitor the output:
Code:
sudo /opt/Mullvad\ VPN/resources/mullvad-daemon -v

That command is saying 'command not found'. I am on ubuntu.

I checked systemctl status mullvad-daemon which showed as failed with this log:

Sep 30 16:31:16 dxb systemd[1]: Started Mullvad VPN daemon.
Sep 30 16:31:16 dxb systemd[1]: mullvad-daemon.service: Main process exited, code=exited, status=203/EXEC
Sep 30 16:31:16 dxb systemd[1]: mullvad-daemon.service: Failed with result 'exit-code'.
Sep 30 16:31:17 dxb systemd[1]: mullvad-daemon.service: Scheduled restart job, restart counter is at 5.
Sep 30 16:31:17 dxb systemd[1]: Stopped Mullvad VPN daemon.
Sep 30 16:31:17 dxb systemd[1]: mullvad-daemon.service: Start request repeated too quickly.
Sep 30 16:31:17 dxb systemd[1]: mullvad-daemon.service: Failed with result 'exit-code'.
Sep 30 16:31:17 dxb systemd[1]: Failed to start Mullvad VPN daemon.

If I type mullvad status, it shows this response:

Error: Management interface error
Caused by: Management RPC server or client error
Caused by: transport error
Caused by: error trying to connect: No such file or directory (os error 2)
Caused by: No such file or directory (os error 2)
 
Everthing is working, lets wrap up:

In /etc/pve/lxc/{{ VMID }}.conf add:

Code:
lxc.mount.entry: /dev/net dev/net none bind,create=dir
lxc.mount.entry: /tmp/net-cls-v1 tmp/net-cls-v1 none bind,create=dir

On your Proxmox host do:

Code:
script=/root/pepare-mullvad-lxc.sh
servicename=pepare-mullvad-lxc
cat > $script <<EOF
#!/usr/bin/env bash
chown 100000:100000 /dev/net/tun
mkdir -p /tmp/net-cls-v1
mount -t cgroup -o net_cls none /tmp/net-cls-v1
chown -R 100000:100000 /tmp/net-cls-v1
EOF
chmod +x $script
cat > /etc/systemd/system/$servicename.service <<EOF
[Service]
ExecStart=$script
[Install]
WantedBy=default.target
EOF
systemctl enable $servicename
systemctl start $servicename

Now start the container and install Mullvad:

Code:
curl -sSL https://mullvad.net/download/app/deb/latest-beta/ --output /tmp/mullvad.deb
sudo apt install /tmp/mullvad.deb -y

Mullvad should now be working:
Code:
$ mullvad account login 1234567890
$ mullvad connect
$ mullvad status
Connected to se4-wireguard in Malmö, Sweden
$ curl https://am.i.mullvad.net/connected
You are connected to Mullvad (server se4-wireguard). Your IP address is 193.138.218.160

But there is a catch, pve seems to have trouble reaching unified cgroupe now:
can't open '/sys/fs/cgroup/memory/lxc/XXX/ns/memory.stat' - No such file or directory (500)
Good News everyone, I tested this again in 8.2.4 and this is working! The cgroup problem in pve seems to be solved!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!