Use Command to Connect to VPN with Kali Network Manager
Last time I wrote an article to introduce how to import OpenVPN profile into Kali Linux Network Manager so that you can setup the VPN with ease. By doing so you get the benefit of using VPN via the GUI interface with just few clicks.
And I also introduce how to use VSCode Remote Host feature so that you can connect to your Kali Linux with SSH connection and get the benefit of:
- Editing exploit code with Auto-complete / Code highlight
- Being able to switch between exploit code editing and file structure
- Being able to quickly shift to terminal for launching commands
Well, while using GUI interface does give us a more intuitive controls but using the VSCode of simply having SSH access into the Kali Linux also seems pretty neat that we can efficiently get things done.
Therefore, today I will also introduce how to use command line for connecting to VPN that was setup before via Network Manager GUI with following steps:
- first, check your VPN list:
nmcli connection show
# or nmcli c show
2. find the vpn name that you want to connect to and type:
sudo nmcli connection up "TryHackMe Breaching AD"
# or nmcli c up "TryHackMe Breaching AD"
3. check connection status by typing
ip a
4. disconnect by typing
sudo nmcli c down "TryHackMe Breaching AD"
you can also list all active connections to identify the VPN connections you want to disconnect from by typing:
nmcli connection show — active