I have a Raspberry Pi that I'm using as a SMB server for a few months now. I'm using raspbian without graphical interface on it.
I wanted it to be able to have a Wi-Fi Access Point that sends traffic through a Wireguard VPN, so that any device connected to the Pi Wi-fi gets tunneled. I got the wireguard configuration files, and installed wireguard on it, but when I use wg-quick up to bring the wireguard connection, the SSH disconnects and I have to reboot if I want to access it (and of course the VPN goes down again)
Current set up is a Router connected to the Ethernet Cable from the ISP with the configurations for the internet to work, then the other devices connect to the router via Wi-fi and the Raspberry Pi connects through an Ethernet Cable to the router. SMB server works via mdns configuration on the Pi, and the other devices connect to it using it's broadcasted hostname.
I haven't set up the wi-fi ap yet, but I'd like to be able to continue using the SMB server without having to connect through the AP, and I want that if the VPN goes down, all connection through the AP stops (kill switch)
I tried to find tutorials on the web, but I couldn't find a good one, and most are very technical, so, is the configuration I want possible? If so, how do I do?