# Connect to NYU-NET via VPN in GNU/Linux (Debian, Fedora, Ubuntu) :closed_lock_with_key:
Scope: Use OpenConnect VPN client to connect to NYU-NET, the university's wide-area network *(WAN)*.

### Preflight check
You'll need the following packages:

- openconnect
- network-manager-openconnect
- network-manager-openconnect-gnome

You may install them via your operating system's *(OS)* package manager:

*Debian, Ubuntu:*

`apt-get install openconnect network-manager-openconnect network-manager-openconnect-gnome`

*Fedora:*

`dnf install openconnect network-manager-openconnect network-manager-openconnect-gnome`


### How to connect to NYU-NET via OpenConnect from a Terminal

You can access NYU-NET using a full- or split-tunnel connection:

- NYU VPN: All Traffic
- NYU VPN: NYU-NET Traffic Only

and you'll need to indicate the type of connection you want to establish using the: `--authgroup` option.

- *Step 1 (on local client):*

Initiate a connection:

`sudo openconnect --background --user NetID --authgroup "NYU VPN: All Traffic" vpn.nyu.edu`

- *Step 2 (on local client):*

When prompted, provide your credentials:  

`password:(your local password)`

- *Step 3 (on local client):*

VPN authentication requires a: valid NetID and password, as well as access to a multi-factor authentication *(MFA)* device. The second password prompt requires you to enter one of the following:

`push` - push notification via Duo App

`phone1` - phone call to your primary registered phone number

`sms` - text message to your primary registered phone number

For example:

`Username:(your NetID)`

`Password:(your NetID password)`

`Password:(push)`

- *Step 4 (on MFA device, e.g. smartphone):*

Accept the push.

- *Step 5 (on local client):*

When you want to disconnect, bring the background process to the foreground:

`sudo killall -SIGINT openconnect`

then end it with:

`SIGINT` *(Ctrl + C)*

or:

`SIGTERM`*(Ctrl + Z)*

:neckbeard::heart: