cloudmesh-vpn


Namecloudmesh-vpn JSON
Version 5.0.13 PyPI version JSON
download
home_pageNone
SummaryVirtual Private Network connection in the cloudmesh suite
upload_time2024-04-04 18:40:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ Copyright 2021,2022 Gregor von Laszewski, University of Virginia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords helper library cloudmesh
VCS
bugtrack_url
requirements cloudmesh-cmd5 cloudmesh-sys cloudmesh-inventory cloudmesh-configuration keyring pexpect pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cloudmesh-vpn

| School  | Tested | VPN-Slicing |
| ------- | ------ | ----------- |
| UVA&nbsp; <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/University_of_Virginia_Rotunda_logo.svg/2007px-University_of_Virginia_Rotunda_logo.svg.png" alt="uva" height="15"/> | ✅ | ❌ |
| FIU&nbsp; <img src="https://brand.fiu.edu/_assets/images/fiu-alone.png" alt="fiu" height="15"/> | ✅ | ❌ |
| UFL&nbsp; <img src="https://www.ufl.edu/wp-content/uploads/sites/5/2022/12/UF-logo-500x500-1.png" alt="uf" height="15"/> | ✅ | ✅ |
| FAMU | ❌ | ❌ |
| NYU | ✅ | ❌ |
| UCI | ❌ | ❌ |
| GMU | ❌ | ❌ |
| OleMiss | ❌ | ❌ |
| SC | ❌ | ❌ |

## Install

### Windows

Open any terminal (git bash, cmd, powershell) as administrator.

Python 3.12 is recommended, which can be
[downloaded from the Python website.](https://www.python.org/downloads/) Your Python version can be checked
with the command `python -V`

Once confirming Python, execute:

```bash
pip install cloudmesh-vpn
```

## Usage

To connect to the UVA Anywhere VPN, run

```bash
cms vpn connect
```

For other organizations, the `--service` flag can be used:

```bash
cms vpn connect --service=ufl
# possible services are uva fiu ufl
```

Note- currently the output will be piped to the terminal
and will end in response to `Ctrl + C`
consider executing the following:

`nohup cms vpn connect --service=ufl >/dev/null 2>&1`

To disconnect from current VPN, run

```bash
cms vpn disconnect
```

To see info regarding your connection, run

```bash
cms vpn info
```

## Linux

### Requirements

On Linux we use the command `openconnect`. To check if it is available please use

```bash
$ which openconnect
```

If it is not available, you can install it un Ubuntu with 

```bash
$ sudo apt install openssl
$ sudo apt install openconnect
$ sudo apt install network-manager-openconnect
```
and in case you use gnoe also:

```bash
$ sudo apt install network-manager-gnome
$ sudo apt install network-manager-openconnect-gnome
```

### Getting certificates

We have tested this tool only with University of Virginia, but it should be simple to adapt. Just follow the 
instructions to obtain the certificates from your provider.

At UVA you find the certificate and other documentation at 

* <https://www.rc.virginia.edu/userinfo/linux/uva-anywhere-vpn-linux/>

we place all certificates into ~/.ssh/uva

```
mkdir -p You will receive a file ending in .p12. In this example we will assume it is named mst3k.p12.
cd ~/.ssh/uva
wget https://download.its.virginia.edu/local-auth/universal/usher.cer
```

To get a certificate for your device, go to 

* <https://cloud.securew2.com/public/82116/limited/?device=Unknown>

Fill it out and get the key. You will receive a 
file ending in .p12. In this example we will assume it 
is named mst3k.p12 and place it into ~/.ssh/uva/user.p12

It is important for us to rename this key to user.p12
so we have a simpler way of identifying it and writing this documentation.

Now convert the keys and certificates with the following commands

```bash
cd ~/.ssh/uva
openssl pkcs12 -in mst3k.p12 -nocerts -nodes -out mst3k.key
openssl pkcs12 -in mst3k.p12 -clcerts -nokeys -out mst3k.crt
openssl x509 -inform DER -in usher.cer -out usher.crt
```


Now your UVA directory should have the following files in it.

```
ls ~/.ssh/uva/
user.crt  user.key  user.p12  usher.cer  usher.crt
```


### Install and using the command

You can now use the cloudmesh cms vpn command.


```bash
$ pip install cloudmesh-vpn
$ cms help
```

To connect use 


```bash
$ cms vpn connect 
```

To show the status use

```bash
$ cms vpn connect 
```


To disconnect

```bash
$ cms vpn disconnect
```

## Acknowledgments

This work was in part funded by the NSF
CyberTraining: CIC: CyberTraining for Students and Technologies
from Generation Z with the award numbers 1829704 and 2200409.



## Manual Page

<!-- START-MANUAL -->
```
Command vpn
===========

::

  Usage:
        vpn connect [--service=SERVICE] [--timeout=TIMEOUT] [-v] [--choco]
        vpn disconnect [-v]
        vpn status [-v]
        vpn info

  This command manages the vpn connection

  Options:
      -v       debug [default: False]
      --choco  installs chocolatey [default: False]

  Description:
    vpn info
       prints out information about your current location as
       obtained via the vpn connection.

    vpn status
        prints out "True" if the vpn is connected
        and "False" if it is not.

    vpn disconnect
        disconnects from the VPN.

    vpn connect [--service=SERVICE]
        connects to the UVA Anywhere VPN.

        If the VPN is already connected a warning is shown.

        You can connect to other VPNs while specifying their names
        as given to you by the VPN provider with e service option.


```
<!-- STOP-MANUAL -->

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cloudmesh-vpn",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Gregor von Laszewski <laszewski@gmail.com>, \"J.P. Fleischer\" <jacquespfleischer@gmail.com>",
    "keywords": "helper library, cloudmesh",
    "author": null,
    "author_email": "Gregor von Laszewski <laszewski@gmail.com>, \"J.P. Fleischer\" <jacquespfleischer@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/6c/0f/d23783db49a7cef4166e55380cca3a0de0142a4c3b2362a24daa88afb8cc/cloudmesh-vpn-5.0.13.tar.gz",
    "platform": null,
    "description": "# cloudmesh-vpn\r\n\r\n| School  | Tested | VPN-Slicing |\r\n| ------- | ------ | ----------- |\r\n| UVA&nbsp; <img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/University_of_Virginia_Rotunda_logo.svg/2007px-University_of_Virginia_Rotunda_logo.svg.png\" alt=\"uva\" height=\"15\"/> | \u2705 | \u274c |\r\n| FIU&nbsp; <img src=\"https://brand.fiu.edu/_assets/images/fiu-alone.png\" alt=\"fiu\" height=\"15\"/> | \u2705 | \u274c |\r\n| UFL&nbsp; <img src=\"https://www.ufl.edu/wp-content/uploads/sites/5/2022/12/UF-logo-500x500-1.png\" alt=\"uf\" height=\"15\"/> | \u2705 | \u2705 |\r\n| FAMU | \u274c | \u274c |\r\n| NYU | \u2705 | \u274c |\r\n| UCI | \u274c | \u274c |\r\n| GMU | \u274c | \u274c |\r\n| OleMiss | \u274c | \u274c |\r\n| SC | \u274c | \u274c |\r\n\r\n## Install\r\n\r\n### Windows\r\n\r\nOpen any terminal (git bash, cmd, powershell) as administrator.\r\n\r\nPython 3.12 is recommended, which can be\r\n[downloaded from the Python website.](https://www.python.org/downloads/) Your Python version can be checked\r\nwith the command `python -V`\r\n\r\nOnce confirming Python, execute:\r\n\r\n```bash\r\npip install cloudmesh-vpn\r\n```\r\n\r\n## Usage\r\n\r\nTo connect to the UVA Anywhere VPN, run\r\n\r\n```bash\r\ncms vpn connect\r\n```\r\n\r\nFor other organizations, the `--service` flag can be used:\r\n\r\n```bash\r\ncms vpn connect --service=ufl\r\n# possible services are uva fiu ufl\r\n```\r\n\r\nNote- currently the output will be piped to the terminal\r\nand will end in response to `Ctrl + C`\r\nconsider executing the following:\r\n\r\n`nohup cms vpn connect --service=ufl >/dev/null 2>&1`\r\n\r\nTo disconnect from current VPN, run\r\n\r\n```bash\r\ncms vpn disconnect\r\n```\r\n\r\nTo see info regarding your connection, run\r\n\r\n```bash\r\ncms vpn info\r\n```\r\n\r\n## Linux\r\n\r\n### Requirements\r\n\r\nOn Linux we use the command `openconnect`. To check if it is available please use\r\n\r\n```bash\r\n$ which openconnect\r\n```\r\n\r\nIf it is not available, you can install it un Ubuntu with \r\n\r\n```bash\r\n$ sudo apt install openssl\r\n$ sudo apt install openconnect\r\n$ sudo apt install network-manager-openconnect\r\n```\r\nand in case you use gnoe also:\r\n\r\n```bash\r\n$ sudo apt install network-manager-gnome\r\n$ sudo apt install network-manager-openconnect-gnome\r\n```\r\n\r\n### Getting certificates\r\n\r\nWe have tested this tool only with University of Virginia, but it should be simple to adapt. Just follow the \r\ninstructions to obtain the certificates from your provider.\r\n\r\nAt UVA you find the certificate and other documentation at \r\n\r\n* <https://www.rc.virginia.edu/userinfo/linux/uva-anywhere-vpn-linux/>\r\n\r\nwe place all certificates into ~/.ssh/uva\r\n\r\n```\r\nmkdir -p You will receive a file ending in .p12. In this example we will assume it is named mst3k.p12.\r\ncd ~/.ssh/uva\r\nwget https://download.its.virginia.edu/local-auth/universal/usher.cer\r\n```\r\n\r\nTo get a certificate for your device, go to \r\n\r\n* <https://cloud.securew2.com/public/82116/limited/?device=Unknown>\r\n\r\nFill it out and get the key. You will receive a \r\nfile ending in .p12. In this example we will assume it \r\nis named mst3k.p12 and place it into ~/.ssh/uva/user.p12\r\n\r\nIt is important for us to rename this key to user.p12\r\nso we have a simpler way of identifying it and writing this documentation.\r\n\r\nNow convert the keys and certificates with the following commands\r\n\r\n```bash\r\ncd ~/.ssh/uva\r\nopenssl pkcs12 -in mst3k.p12 -nocerts -nodes -out mst3k.key\r\nopenssl pkcs12 -in mst3k.p12 -clcerts -nokeys -out mst3k.crt\r\nopenssl x509 -inform DER -in usher.cer -out usher.crt\r\n```\r\n\r\n\r\nNow your UVA directory should have the following files in it.\r\n\r\n```\r\nls ~/.ssh/uva/\r\nuser.crt  user.key  user.p12  usher.cer  usher.crt\r\n```\r\n\r\n\r\n### Install and using the command\r\n\r\nYou can now use the cloudmesh cms vpn command.\r\n\r\n\r\n```bash\r\n$ pip install cloudmesh-vpn\r\n$ cms help\r\n```\r\n\r\nTo connect use \r\n\r\n\r\n```bash\r\n$ cms vpn connect \r\n```\r\n\r\nTo show the status use\r\n\r\n```bash\r\n$ cms vpn connect \r\n```\r\n\r\n\r\nTo disconnect\r\n\r\n```bash\r\n$ cms vpn disconnect\r\n```\r\n\r\n## Acknowledgments\r\n\r\nThis work was in part funded by the NSF\r\nCyberTraining: CIC: CyberTraining for Students and Technologies\r\nfrom Generation Z with the award numbers 1829704 and 2200409.\r\n\r\n\r\n\r\n## Manual Page\r\n\r\n<!-- START-MANUAL -->\r\n```\r\nCommand vpn\r\n===========\r\n\r\n::\r\n\r\n  Usage:\r\n        vpn connect [--service=SERVICE] [--timeout=TIMEOUT] [-v] [--choco]\r\n        vpn disconnect [-v]\r\n        vpn status [-v]\r\n        vpn info\r\n\r\n  This command manages the vpn connection\r\n\r\n  Options:\r\n      -v       debug [default: False]\r\n      --choco  installs chocolatey [default: False]\r\n\r\n  Description:\r\n    vpn info\r\n       prints out information about your current location as\r\n       obtained via the vpn connection.\r\n\r\n    vpn status\r\n        prints out \"True\" if the vpn is connected\r\n        and \"False\" if it is not.\r\n\r\n    vpn disconnect\r\n        disconnects from the VPN.\r\n\r\n    vpn connect [--service=SERVICE]\r\n        connects to the UVA Anywhere VPN.\r\n\r\n        If the VPN is already connected a warning is shown.\r\n\r\n        You can connect to other VPNs while specifying their names\r\n        as given to you by the VPN provider with e service option.\r\n\r\n\r\n```\r\n<!-- STOP-MANUAL -->\r\n",
    "bugtrack_url": null,
    "license": "Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  Copyright 2021,2022 Gregor von Laszewski, University of Virginia  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ",
    "summary": "Virtual Private Network connection in the cloudmesh suite",
    "version": "5.0.13",
    "project_urls": {
        "Changelog": "https://github.com/cloudmesh/cloudmesh-vpn/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/cloudmesh/cloudmesh-vpn/blob/main/README.md",
        "Homepage": "https://github.com/cloudmesh/cloudmesh-vpn",
        "Issues": "https://github.com/cloudmesh/cloudmesh-vpn/issues",
        "Repository": "https://github.com/cloudmesh/cloudmesh-vpn.git"
    },
    "split_keywords": [
        "helper library",
        " cloudmesh"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c1831455ae884fa2886a2a7dd70b5e7f33551c49c0bf684066d69c1a3ef1e608",
                "md5": "7df20b30c9b6892397745df805a016dc",
                "sha256": "5aa5bca8463a807afac52ec7d5f812d766a2dd1325360053a0bee3dd9d55f881"
            },
            "downloads": -1,
            "filename": "cloudmesh_vpn-5.0.13-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7df20b30c9b6892397745df805a016dc",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 20085,
            "upload_time": "2024-04-04T18:40:49",
            "upload_time_iso_8601": "2024-04-04T18:40:49.775496Z",
            "url": "https://files.pythonhosted.org/packages/c1/83/1455ae884fa2886a2a7dd70b5e7f33551c49c0bf684066d69c1a3ef1e608/cloudmesh_vpn-5.0.13-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c0fd23783db49a7cef4166e55380cca3a0de0142a4c3b2362a24daa88afb8cc",
                "md5": "aa954606c4c3897a83c3c8c83f974311",
                "sha256": "0d63d592ca363342fe1b568635d97e5411bf0b4c5c3c62062fc0c2abf4935fad"
            },
            "downloads": -1,
            "filename": "cloudmesh-vpn-5.0.13.tar.gz",
            "has_sig": false,
            "md5_digest": "aa954606c4c3897a83c3c8c83f974311",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 21593,
            "upload_time": "2024-04-04T18:40:51",
            "upload_time_iso_8601": "2024-04-04T18:40:51.732780Z",
            "url": "https://files.pythonhosted.org/packages/6c/0f/d23783db49a7cef4166e55380cca3a0de0142a4c3b2362a24daa88afb8cc/cloudmesh-vpn-5.0.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-04 18:40:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cloudmesh",
    "github_project": "cloudmesh-vpn",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "cloudmesh-cmd5",
            "specs": []
        },
        {
            "name": "cloudmesh-sys",
            "specs": []
        },
        {
            "name": "cloudmesh-inventory",
            "specs": []
        },
        {
            "name": "cloudmesh-configuration",
            "specs": []
        },
        {
            "name": "keyring",
            "specs": []
        },
        {
            "name": "pexpect",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        }
    ],
    "lcname": "cloudmesh-vpn"
}
        
Elapsed time: 0.20021s