Results 1 to 9 of 9

Thread: Launch/disable vpn from command line

  1. #1
    Join Date
    Jun 2007
    Beans
    45

    Launch/disable vpn from command line

    I generally use NetworkManager (the applet in Karmic) for managing network connections, but I would like the ability to close a VPN connection from the command line. How do I do this? I have been searching and am quite surprised that there isn't (as far as I have been able to tell) a simple command.

    If there is not in fact a simple command, can someone perhaps provide a link or resource that explains network manager and its relationship to other networking software such as wpa_supplicant?

    Thanks!

  2. #2
    Join Date
    Jan 2007
    Beans
    6

    Re: Launch/disable vpn from command line

    Funny, was trying to do so an hour ago, in order to script it with proxydriver when I connect my lappy at school.
    What I tried so far:
    /usr/lib/network-manager-vpnc/nm-vpnc-auth-dialog -s org.freedesktop.NetworkManager.vpnc -u "UUID"
    The UUID can be found by starting:
    gconf-editor
    then in "/system/networking/connection"
    and find the one having a having a "vpn" folder and copy/paste the UUID
    But... the command runs fine, but doent do anything like connection the VPNC
    Good luck, we keep in touch

  3. #3
    Join Date
    Jun 2007
    Beans
    45

    Re: Launch/disable vpn from command line

    Tweepy, thanks. Your suggestion doesn't work for me either. All it does is display my passwords on the command line!

    This is strange that there is no simple way to start or stop vpn.

  4. #4
    Join Date
    Sep 2007
    Location
    Riga, Latvia
    Beans
    324
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: Launch/disable vpn from command line

    For coomand-line vpn,
    poff NAME_OF_NETWORK

    Since I don't use Network Manager (I establish the connection form commandline), I have no idea if this works for you.

    EDIT: to start it, I type
    pon NAME_OF_NETWORK

    You should launch them as a root (my terminal is always under root) to avoid typing sudo each time, use
    sudo su
    Last edited by Julita; February 25th, 2010 at 12:53 PM.

  5. #5
    Join Date
    Jun 2007
    Beans
    45

    Re: Launch/disable vpn from command line

    Julita, pon and poff may do VPN, but "man pon" says this is for PPP, with no reference to VPN. So I think you're right that this is independent from networkmanager.

  6. #6
    Join Date
    Sep 2007
    Location
    Riga, Latvia
    Beans
    324
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: Launch/disable vpn from command line

    In fact, VPN uses PPP, so it is relevant in this situation.

  7. #7
    Join Date
    Jan 2008
    Beans
    16

    Re: Launch/disable vpn from command line

    Old post, I know, sorry, but I was looking for this, and I found the following, which sorted the issues everyone's having:

    http://ubuntuforums.org/showthread.php?t=800330

  8. #8
    Join Date
    May 2009
    Beans
    3

    Re: Launch/disable vpn from command line

    Looks like this is built into Ubuntu now (Precise is what I have) in a command called 'nmcli'.

  9. #9
    Join Date
    Dec 2010
    Beans
    Hidden!

    Re: Launch/disable vpn from command line

    Quote Originally Posted by jaraco View Post
    Looks like this is built into Ubuntu now (Precise is what I have) in a command called 'nmcli'.
    Thanks for the info...

    Old thread closed.


    404

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •