en:vpn:renew-cert
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:vpn:renew-cert [2020/01/04 16:45] – hgo | en:vpn:renew-cert [2024/06/19 08:33] (current) – [1. Neutrinet app] hgo | ||
---|---|---|---|
Line 7: | Line 7: | ||
in `/ | in `/ | ||
- | To check its expiry date, as `root`: | + | To check its expiry date, as `root` |
```sh | ```sh | ||
- | $ openssl x509 -in / | + | $ openssl x509 -in / |
notAfter=Nov 12 13:42:43 2018 GMT | notAfter=Nov 12 13:42:43 2018 GMT | ||
``` | ``` | ||
Line 15: | Line 15: | ||
There are four methods to renew the certificate. | There are four methods to renew the certificate. | ||
+ | ## 1. Neutrinet app | ||
- | ## Neutrinet app | + | The [[https://apps.yunohost.org/ |
- | + | ||
- | The [[en:cube:apps-neutrinet|Neutrinet app]] takes care of checking every night whether certificates must be renewed. | + | |
### Install | ### Install | ||
- | Check that the Neutrinet' | + | You can either |
- | ```sh | + | |
- | yunohost app listlists | + | |
- | ``` | + | |
- | + | ||
- | If the `neutrinet` list doesn' | + | |
- | ```sh | + | |
- | yunohost app fetchlist -n neutrinet -u https:// | + | |
- | ``` | + | |
- | + | ||
- | Then, you can eithr install the app through the admin panel, or with: | + | |
```sh | ```sh | ||
yunohost app install neutrinet | yunohost app install neutrinet | ||
Line 41: | Line 30: | ||
To upgrade this app: | To upgrade this app: | ||
```sh | ```sh | ||
- | yunohost tools update | + | yunohost tools update apps |
- | yunohost | + | yunohost |
``` | ``` | ||
- | ## From a cube | + | ## 2. From a cube |
If the Neutrinet app is already installed, you can force the certificates verification: | If the Neutrinet app is already installed, you can force the certificates verification: | ||
```sh | ```sh | ||
- | cd / | + | / |
- | ./renew_cert_cron.sh -v | + | |
``` | ``` | ||
- | ## From the renew_cert script | + | ## 3. From the renew_cert script |
Clone the following git repository, either on your cube or your own computer: | Clone the following git repository, either on your cube or your own computer: | ||
Line 89: | Line 77: | ||
Normaly, a subfolder named `certs_YYYY-MM-DD_HH: | Normaly, a subfolder named `certs_YYYY-MM-DD_HH: | ||
- | The files that we need are `client.crt` | + | The files that we need are `client.crt`, `client.key`, and `ca.crt`, i.e. the public and private key of the client certificate, |
These files must replace the files in `/ | These files must replace the files in `/ | ||
Line 98: | Line 86: | ||
sudo mv / | sudo mv / | ||
sudo mv / | sudo mv / | ||
+ | sudo mv / | ||
sudo mv client.crt / | sudo mv client.crt / | ||
sudo mv client.key / | sudo mv client.key / | ||
+ | sudo mv ca.crt / | ||
``` | ``` | ||
Line 106: | Line 96: | ||
**Remark**: Ideally, make sure to be connected on the same local network as your cube, i.e. through its local address (192.168.1.x in most cases). | **Remark**: Ideally, make sure to be connected on the same local network as your cube, i.e. through its local address (192.168.1.x in most cases). | ||
```sh | ```sh | ||
- | sudo systemctl restart | + | sudo systemctl restart |
``` | ``` | ||
- | To check that you are connected to the VPN, you can run the following command: | + | You can check that everything went well by looking at the logs: |
- | ```sh | + | ``` |
- | ip addr | + | tail / |
``` | ``` | ||
- | Normaly, the `tun0` interface should appear in the list. | + | ## 4. From user.neutrinet.be |
- | + | ||
- | ## From user.neutrinet.be | + | |
This method sometimes requires some patience because user.neutrinet.be can produce some failures. | This method sometimes requires some patience because user.neutrinet.be can produce some failures. | ||
Line 127: | Line 115: | ||
Create a certificate signing request (CSR) for this key: | Create a certificate signing request (CSR) for this key: | ||
```sh | ```sh | ||
- | openssl req -new -newkey rsa:4096 -nodes -keyout user.key | + | openssl req -out client.csr |
``` | ``` | ||
Line 133: | Line 121: | ||
Most important is the `Cname`, that is the name which will be used by Neutrinet to know to whom belongs the certificate. | Most important is the `Cname`, that is the name which will be used by Neutrinet to know to whom belongs the certificate. | ||
- | **Remark**: It is recommanded | + | **Remark**: It is recommended |
This command create a file named `client.csr`, | This command create a file named `client.csr`, |
en/vpn/renew-cert.1578152705.txt.gz · Last modified: 2020/01/04 16:45 by hgo