Forked from zealfire/install_forticlientsslvpn_linux
Last active
August 30, 2021 04:52
-
-
Save tsohr/49859b54670ca7e11dcb960dfe50cd83 to your computer and use it in GitHub Desktop.
Install forticlient in linux. Replace HOST, PORT, USER and PASS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install expect | |
wget https://hadler.me/files/forticlient-sslvpn_4.4.2333-1_amd64.deb | |
sudo dpkg -i forticlient-sslvpn_4.4.2333-1_amd64.deb | |
/opt/forticlient-sslvpn/64bit/helper/setup | |
cat > sslvpn << EOF | |
#!/usr/bin/expect -f | |
set hostandport [lindex \$argv 0]; | |
set user [lindex \$argv 1]; | |
set pass [lindex \$argv 2]; | |
set timeout -1 | |
cd /opt/forticlient-sslvpn/64bit/ | |
spawn ./forticlientsslvpn_cli --server \$hostandport --vpnuser \$user --keepalive | |
expect "Password for VPN:" {send -- "\$pass\r"} | |
expect "to this server? (Y/N)\r" {send -- "y\r"} | |
expect eof | |
EOF | |
chmod +x sslvpn | |
sudo mv sslvpn /usr/local/bin/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# please try with Ubuntu. | |
[Unit] | |
Description=SSL VPN connection for the site ABC | |
Wants=network.target | |
After=network-online.target | |
[Service] | |
Restart=always | |
ExecStart=/usr/local/bin/sslvpn -d somehost:443 someuser somepw | |
ExecStop=/bin/kill $MAINPID | |
Type=simple | |
RestartSec=10 | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=sslvpn-site-ABC | |
[Install] | |
WantedBy=multi-user.target default.target | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment