Instead of importing the Whonix images every time you want a clean VM, you can use VM snapshots. Take a snapshot before configuring your VPN. If you want to start over, just revert to the last snapshot.
https://www.howtogeek.com/150258/how-to-save-time-by-using-snapshots-in-virtualbox/
sudo nano /etc/whonix_firewall.d/50_user.conf
Add.
VPN_FIREWALL=1
Next, reload Firewall
sudo whonix_firewall
For you can run the following commads for VPN (debug) The last command will give you the log output. (Does this work for you?)
sudo /usr/sbin/openvpn --rmtun --dev tun0
sudo /usr/sbin/openvpn --mktun --dev tun0 --dev-type tun --user tunnel --group tunnel
cd /etc/openvpn/
sudo -u tunnel openvpn /etc/openvpn/openvpn.conf
Thought it would be a good idea to make sure you are not missing anything and we are on the same page) When you get to the end, or you come across a problem, Stop don’t make any changes. A fix early on can bread something later. Lets debug from that point. Logs will be needed. The commands for VPN debug (above) will be Ok if the VPN does not function. If the VPN is functional move on to Enable Tor (step 9).
For Tor logs.
cat /var/run/tor/log
For sdwdate logs
cat /var/log/sdwdate.log
Note: Reinstalling Whonix is not necessary.But remove any settings not provided in the instructions
1. Firewall settings
sudo nano /etc/whonix_firewall.d/50_user.conf
add
VPN_FIREWALL=1
2. Reload firewall
sudo whonix_firewall
3. Sudoers configuration
sudo nano /etc/sudoers.d/tunnel_unpriv
Add
tunnel ALL=(ALL) NOPASSWD: /bin/ip
tunnel ALL=(ALL) NOPASSWD: /usr/sbin/openvpn *
Defaults:tunnel !requiretty
4. Create VPN secrets file.
sudo nano /etc/openvpn/auth.txt
Add
user_name
password
5. Set up VPN configuration file.
sudo nano /etc/openvpn/openvpn.conf
Add your config file.
6. Set folder permissions
sudo chown -R tunnel:tunnel /etc/openvpn
sudo chown -R tunnel:tunnel /var/run/openvpn
7. Create the OpenVPN systemd service file.
sudo cp /lib/systemd/system/openvpn@.service /lib/systemd/system/openvpn@openvpn.service
Enable the OpenVPN systemd service file.
sudo systemctl enable openvpn@openvpn
Start the OpenVPN systemd service.
sudo systemctl start openvpn@openvpn
Check the OpenVPN systemd service status.
sudo systemctl status openvpn@openvpn
8. Enable Tor
sudo whonixsetup
9. (optional)Force Tor to wait for OpenVPN.
Create a folder /etc/systemd/system/tor.service.d.
sudo mkdir /etc/systemd/system/tor.service.d
Create a file /etc/systemd/system/tor.service.d/50_user.conf.
sudo nano /etc/systemd/system/tor.service.d/50_user.conf
Add
[Unit] After=openvpn.service