Auto-connect feature

0

It would be great if the client vpn app allowed to connect on start. What would work is an ability to start the client from shell with an option to connect using a specified profile.

Also why connection start/stop scripts are not supported in client config?

md-mh
質問済み 3ヶ月前194ビュー
2回答
1

1)Create a Startup Script (for Linux): You can create a shell script that runs at startup (e.g., in /etc/rc.local or using systemd) to start the VPN client with the desired profile. This script should include commands to start the VPN client executable with the appropriate command-line options to connect to the specified VPN profile.

2)Use Command-Line Options:
    Most VPN client software provides command-line options to control its behavior, such as connecting to a specific profile.
    Consult the documentation for your VPN client software to identify the available command-line options and how to use them.
    For example, if you're using OpenVPN, you can use the --config option to specify the configuration file (profile) to use.

3)Connection Start/Stop Scripts:
    Some VPN client software may not support connection start/stop scripts directly within the client configuration.
    However, you can still achieve similar functionality by using external scripts in conjunction with the VPN client.
    For example, you can create shell scripts that use the VPN client's command-line options to start and stop connections as needed.

Here's an example of how you might implement this for OpenVPN on Linux:

#!/bin/bash

Start VPN connection using a specified profile

start_vpn() { openvpn --config /path/to/vpn-profile.ovpn }

Stop VPN connection

stop_vpn() { killall openvpn }

Check command-line arguments

case "$1" in start) start_vpn ;; stop) stop_vpn ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac

You can save this script as, for example, vpn.sh and make it executable (chmod +x vpn.sh). Then, you can start the VPN connection using ./vpn.sh start and stop it using ./vpn.sh stop.

Remember to replace /path/to/vpn-profile.ovpn with the actual path to your VPN profile configuration file.

Please note that the specific implementation may vary depending on the VPN client software you're using and the operating system you're working with. Always refer to the documentation and guidelines provided by your VPN client for accurate and up-to-date information.

profile picture
回答済み 3ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前
0

Thank you Hari for the answer but your reply refers to the openvpn client app and not the official AWS Client VPN app which I'm interested in. I should've been more specific in my inital post.

As far as I know (offically) only AWS Client VPN supports SAML authentication that works with AWS Client VPN service.

My requirements are to use SAML auth as SSO and have more control over client behaviour i.e. custom start/stop scripts,connect on login or another user event.

md-mh
回答済み 3ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ