Script to access VPN via openfortivpn on GNU/Linux
# Installl 'openfortivpn'
sudo apt install openfortivpn-
Create a folder called
openfortivpnin the~/Developmentfolder. -
Add the
start-fortclientvpn.shandopenfortivpn-configfiles to theopenfortivpnfolder. -
Enter your user and password in the
openfortivpn-configfile. Example:
username = user password = passwd
- Create an alias to start running it via terminal with the
vpn-linuxcommand.
4.1. Go to the .zshrc file (if you use ZSH as your terminal) or the .bashrc file (if you use Bash as your terminal).
nano ~/.zshrcnano ~/.bashrc4.2. After accessing the file, create an alias by adding the line below to the end of the file
alias vpn-linux="sh ~/Development/openfortivpn/start-fortclientvpn.sh"Then run the command below to apply change:
source ~/.zshrcsource ~/.bashrc
5. Now just run the `vpn-linux` command in the terminal and the connection will start.
6. In some cases, it is necessary to remove the following lines:
set-dns = 1 pppd-use-peerdns = 1