Configure VPN on Linux Ubuntu

Step 1 Content

Install prerequisites. Open a terminal(Ctrl+Alt+t) and type these commands(each command needs to be typed on separate line):

Linux2

sudo apt install \
intltool \
libtool \
network-manager-dev \
libnm-util-dev \
libnm-glib-dev \
libnm-glib-vpn-dev \
libnm-gtk-dev \
libnm-dev \
libnma-dev \
ppp-dev \
libdbus-glib-1-dev \
libsecret-1-dev \
libgtk-3-dev \
libglib2.0-dev \
xl2tpd \
strongswan
After you input this, press enter and you will be prompted for password, type your password. On the next stop, type "y" and press enter.
*Don't close the terminal!*

Step 2 Content

Build the network manager. Type each line in the terminal:
**YOU HAVE TO TYPE THIS ONLY IF YOU DON'T HAVE GIT INSTALLED:**

Linux3

**sudo apt install git**(without the **)
git clone https://github.com/nm-l2tp/network-manager-l2tp.git
cd network-manager-l2tp
autoreconf -fi
intltoolize

Linux4

*Don't close the terminal!*

Step 3 Content

Configure the build. Type each line in the terminal:

./configure \
--disable-static --prefix=/usr \
--sysconfdir=/etc --libdir=/usr/lib/x86_64-linux-gnu \
--libexecdir=/usr/lib/NetworkManager \
--localstatedir=/var \
--with-pppd-plugin-dir=/usr/lib/pppd/2.4.7

Linux5

*Don't close the terminal!*

Step 4 Content

Make it. Type each line in the terminal:

make
sudo make install
*Don't close the terminal!*

Step 5 Content

Remove AppArmor settings for IPSec. Type each line in the terminal:
sudo apparmor_parser -R /etc/apparmor.d/usr.lib.ipsec.charon
sudo apparmor_parser -R /etc/apparmor.d/usr.lib.ipsec.stroke

Linux6

*Almost done. Don't close the terminal!*

Step 6 Content

Replace x2ltpd with libpcap. Type each line in the terminal:
sudo apt remove xl2tpd
**Type "y" and press enter when you are prompted**
sudo apt install libpcap0.8-dev
wget https://github.com/xelerance/xl2tpd/archive/v1.3.6/xl2tpd-1.3.6.tar.gz
tar xvzf xl2tpd-1.3.6.tar.gz
cd xl2tpd-1.3.6
make
sudo make install
Linux8
*Now you can close the terminal and restart your computer to get the changes done.*

Step 7 Content

Restart computer

Now begin the configuration for VPN.
Step 1. Go to System Settings and access Netowrk.
Linux9
Step 2. In the Network panel go to "+" downside left.
Linux10
Step 3. Choose interface type "VPN" and click "Create.."
Linux11
Step 4. Select Point-to-Point Tunnelig Protocol (L2TP) and click "Create..."
Linux12
Step 5. Configure with your credentials, the Gateway, NT Domain is the same(193.231.40.153, INF) and go to "IPSec Settings..."
Linux13
Step 6. In the "IPSec Settings", check "Enable IPsec tunnel to L2TP host" and type the "Pre-shared key" given to you then click "OK" Linux14
Step 7. Now go to "PPP Settings..." and uncheck "PAP, MSCHAP, EAP" and press "OK"
Linux15
Step 8. Click "Save"
Linux13
Step 9. Select AFRODITA VPN and click on "OFF"
Linux16
Linux17