# OpenVPN

{% hint style="warning" %}
OpenVPN was replaced by WireGuard in Spring 2023. The following information is retained for historical purposes.
{% endhint %}

Useful to access all the CSL machines from the comfort of your own home! Running [ansible](/technologies/tools/ansible.md) plays, ssh-ing without having to hop on [RAS](/services/remote-access.md) first, OpenVPN makes everything a breeze!

## History

We used to have unfettered OpenVPN access until ~~the Great Firewall of~~ FCPS decided to indiscriminately block all OpenVPN traffic through some sort of Packet Inspection starting in Fall 2018. Fortunately, we were able to get an exception for the CSL's OpenVPN server, so as of Spring 2019 it is back up.

## Troubleshooting

If you can connect to the VPN successfully, but are having issues accessing other machines, try running the following command on the server:

```
/etc/init.d/net.tap0 restart
```

## Creating Certificates

{% hint style="info" %}
2019djones changed the OpenVPN server to generate `.ovpn` files in Spring 2019.
{% endhint %}

Run the commands below, first setting the `$USERNAME` variable to the username of the person you are generating the certificates for.

```bash
USERNAME=<username>
cd /root/
./quick_add_vpn_user $USERNAME
```

After running the script and selecting the defaults, the `.ovpn` file will appear as `$USERNAME.ovpn`. That file is the only file necessary to connect with an OpenVPN client.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.tjhsst.edu/obsolete/openvpn.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
