and also make ** the prohibition of traffic leaks past vpn **
!! in Debian: everything needs to be done as root in Ubuntu and Mint, you need to add sudo to all commands.
apt-get install openvpn
openvpn --version
openvpn --config client.ovpn
but we will do it in the Debian way
mv dir-with-crt-key-ovpn-files/* /etc/openvpn
(after that you need to check that the configuration file is called client.conf - if not - rename)
/etc/init.d/openvpn start
With the following command you can see the process
ps aux | grep openvpn
You can also check by going to the sites that define ip now works, there is a little bit to adjust
aptitude install sysv-rc-conf
run the command sysv-rc-conf and set or disable from 2-5 levels of the mark on the service openvpn (Similarly, you can disable the network manager, if necessary) Exit the utility with the "q" command
create and fill the script:
echo '#!/bin/bash' > /etc/openvpn/openvpn.sh
echo '/etc/init.d/openvpn restart && sleep 5 && ip r d `ip r s | grep default`' >> /etc/openvpn/openvpn.sh
make it executable:
chmod +x /etc/openvpn/openvpn.sh
Now you can run it from the command line by simple typing
/etc/openvpn/openvpn.sh
or
sh /etc/openvpn/openvpn.sh
as well as double-clicking