Script to access VPN via openfortivpn on GNU/Linux
# Installl 'openfortivpn'
sudo apt install openfortivpn
-
Create a folder called
openfortivpn
in the~/Development
folder. -
Add the
start-fortclientvpn.sh
andopenfortivpn-config
files to theopenfortivpn
folder. -
Enter your user and password in the
openfortivpn-config
file. Example:
username = user password = passwd
- Create an alias to start running it via terminal with the
vpn-linux
command.
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 ~/.zshrc
nano ~/.bashrc
4.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