When to Renew the Tunnel Proxy #
There are two circumstances that require you to renew your existing tunnel proxy:
-
Lucidum releases a new version of the proxy image. Periodically, Lucidum updates the proxy image. The latest image includes the latest OS updates and latest package updates and is therefore most secure. The current tunnel proxy image is v1.1.2.
To determine the latest image version:
-
-
Log in to Lucidum.
-
Go to Settings > Tunnel Proxy Settings.
-
In the Tunnel Proxy Settings page, click the View Setup Instruction (briefcase) icon.
-
The last line of code in Step 8 displays the latest image version.
-
-
VPN certificate expired or is soon to expire. The Lucidum tunnel proxy uses OpenVPN and creates its own self-signed certificate with a 2-year lifetime. When the certificate expires, the tunnel proxy will no longer work. Prior to certificate expiration, follow the steps in this chapter to to renew your tunnel proxy.
To determine when your certificate will expire:
-
-
Log in to Lucidum
-
go to Settings > Tunnel Proxy Settings.
-
In the Tunnel Proxy Settings page, view the Expires On column to determine the expiration date for each tunnel proxy.
-
Prerequisites #
To perform the steps in this chapter, you must know the root user name and password for the Linux server that serves as the proxy. Note that Lucidum has no way to track or retrieve the root user name and password.
If you cannot locate the root user name and password, you can rebuild the Linux server using these steps in the chapter on Configuration a Proxy Server:
You can then return to this chapter and perform the steps in this chapter.
Lucidum: Delete the Current Proxy #
To renew your tunnel proxy, you need to first delete the existing tunnel proxy from Lucidum. To do this:
-
Login to your Lucidum system.
-
Go to Settings > Tunnel Proxy Settings.
-
In the Tunnel Proxy Settings page, find the tunnel proxy you want to renew and click the Delete Tunnel Proxy (trashcan) icon.
-
When prompted, click Confirm.
Linux Server: Stop Docker and Remove the Docker Container #
You must delete the existing docker container from the Linux server. To do this:
-
Either log in to the console of the proxy server or use SSH to access the server
-
Open a shell session.
-
View a list of docker containers that are running. To do this, at the shell prompt, type:
docker ps
-
In the output, you should see a container with NAMES of “lucidum-tunnel“. This is the tunnel proxy for Lucidum.
-
Stop the docker container. To do this, at the shell prompt, type:
docker stop lucidum-tunnel
-
Delete the docker container. To do this, at the shell prompt, type:
docker rm lucidum-tunnel
Lucidum: Define the new Tunnel Proxy and Download client.conf #
To create the proxy server, Lucidum supplies a file called client.conf.
-
Login to your Lucidum system.
-
Go to Settings > Tunnel Proxy Settings.
-
In the Tunnel Proxy Settings page, click the Add (plus sign) icon.
-
In the Add Tunnel Proxy modal page, supply a name of the proxy and click Save.
-
The new tunnel proxy appears in the Tunnel Proxy Settings page.
-
Click the Download Configuration (download) icon for the new tunnel proxy. Lucidum will download a file named client.conf to your local computer.
-
The client.conf file includes:
-
FQDN and port for the tunnel endpoint
-
Keys
-
TLS certs
-
Linux Server: Update client.conf #
You now must replace the existing file, client.conf, with the new version you downloaded from Lucidum.
The easiest way to do this is by editing the existing file and replacing its contents. To do this:
-
Either log in to the console of the proxy server or use SSH to access the server.
-
Navigate to the directory /usr/lucidum/tunnel. To do this, at the shell prompt, type:
cd /usr/lucidum/tunnel
-
Using vi (or an editor of your choice) open the file client.conf.
vi client.confl
-
Delete the contents of client.conf.
-
To do so, first press the [Esc] key. Then press the colon ( : ) key. This enables a command line at the bottom of the file.
-
At the colon command line at the bottom of the page, enter %d
-
Press the [Enter] key.
-
Leave the file open.
-
On your local computer, navigate to the directory where you downloaded the latest version of client.conf. Copy its contents.
-
Back at the shell prompt, in the open file, press the [Esc] key and press the [i] key. This enables insert mode.
-
Paste the copied text with [ctrl] + [v]
-
Press the [Esc] key. Then press the colon ( : ) key. This enables a command line at the bottom of the file.
-
At the colon command line at the bottom of the page, enter wq
-
The client.conf file is saved with the new content.
Linux Server: Start Docker and Run the Docker Image #
Next, you must start docker and run the docker image.
-
Either log in to the console of the proxy server or use SSH to access the server.
-
On the proxy server, open a shell session.
-
See if Docker is running. To do this, at the shell prompt, type:
docker ps
-
If you see the message “Cannot connect to Docker daemon…”, you must start Docker.
-
Start Docker. To do this, at the shell prompt, type:
sudo systemctl start docker
-
See if Docker is running. To do this, at the shell prompt, type:
docker ps
-
If you are using Red Hat Enterprise Linux, enter the following commands to start the new Docker container. At the shell prompt, type:
docker run -d --cap-add=NET_ADMIN \
--device=/dev/net/tun \
--restart=unless-stopped \
--network=bridge \
-v /usr/lucidum/tunnel: /data:ro \
--name=lucidum-tunnel \
--ulimit nofile=1048576:1048576 \
public.ecr.aws/lucidum/tunnel-client:v1.1.2
-
If you are using any version of Linux except Red Hat Enterprise Linux, enter the following commands to start the new Docker container. At the shell prompt, type:
docker run -d --cap-add=NET_ADMIN \
--device=/dev/net/tun \
--restart=unless-stopped \
--network=bridge \
-v /usr/lucidum/tunnel: /data:ro \
--name=lucidum-tunnel \
public.ecr.aws/lucidum/tunnel-client:v1.1.2
-
After the you enter the last command, Docker will:
-
download the latest image from the Lucidum public repository and create a Docker container from the image
-
read the connection and certificate information from /usr/lucidum/tunnel/client.conf
-
attempt to connect to the server defined in the client.conf file. The server is defined in the line that begins with “remote“, usually line 7 of the file.
-
Lucidum: Verify Connection #
To verify the tunnel proxy connection:
-
Login to your Lucidum system.
-
Go to Settings > Tunnel Proxy Settings.
-
In the Tunnel Proxy Settings page, find the new proxy.
-
If the Status column displays a green checkmark, the connection is healthy.
-
If the Status column displays a red box, the connection has errors.
Troubleshooting #
The first step in troubleshooting the tunnel proxy is to examine the Docker logs. To do this:
-
Either log in to the console of the proxy server or use SSH to access the server.
-
On the proxy server, open a shell session.
-
View the logs for the tunnel connection. To do this, at the shell prompt, type:
docker logs lucidum-tunnel
-
If you see this error in the log:
Options error: In [CMD-LINE]:1: Error opening configuration file: /data/client.conf
Docker was unable to read the file /usr/lucidum/tunnel/client.conf file.
Possible reasons for this failure:
Problem | Diagnostics and Repair |
File does not exist | Check that the file exists:
|
File has incorrect permissions | Check read permissions for the file
|
Path has incorrect permissions | Check read permissions for the path
|
The contents of /usr/lucidum/tunnel/client.conf are incorrect | View the file:
|
Outbound network connection has been filtered by firewall rules
|
View client.conf to find the hostname
|
Your egress IP changed, and Lucidum needs to update the allow-list for your organization. | For your protection, Lucidum maintains a strict allow-list of IP addresses that are allowed to attempt connection to your system.
When your proxy was initially configured, we added your current egress IP to the list of allowed addresses. If your egress IP changes, contact your Lucidum account representative. We can update the Lucidum allow-list. Let us know via email or Slack and we will make the change and verify that the proxy connection succeeds. |
All other issues: | Contact your Lucidum account representative for assistance. |