I have been trying to setup a Raspberry Pi as a "Gateway" to my VPN server, even though I am not a sysadmin, I am usually fine with setting up software such as NGiNX however this has taken a lot of time and yielded no results hence my post.
The VPN server is powered by StrongSwan with IKEv2, testing it with the Windows VPN client was okay, everything worked (authentication is done using PKI, more specifically through a .p12 file).
This is a brief diagram of what I am trying to accomplish:
From what I gathered, making devices use the VPN via the RPi could be as simple as changing the default gateway to the IP address of the Raspberry Pi. If my assumption is correct then all I would need to do is setup the Pi to forward ALL traffic it receives to the VPN.
I have tried many tutorials from various websites however I could not find a configuration file that would work. The RPi is running Raspbian 9 (stretch) with openswan installed on it.
The problem seems pretty trivial however I could not find answers on how to solve it and am sure that there are other people who would like to achieve the same effect.
I would appreciate if someone could create a step-by-step guide that would fit this specific use case (Raspbian 9, all traffic, PKI authentication, IKEv2).