How to Install Inlets on OpenSUSE Latest
Inlets is a tool that enables you to expose local services to the internet via a public IP address or domain name. It creates a secure tunnel between a client and a remote server, giving you full control over traffic to your services. Inlets can work with any TCP traffic, including HTTP, HTTPS, SSH, and other services.
Here are the steps to install Inlets on OpenSUSE Latest:
Step 1: Create a New User
It is always recommended to create a separate user to run the Inlets process. The following command creates a new user named "inlets":
sudo useradd -m inlets
You can set a password for the user by running:
sudo passwd inlets
Step 2: Install Inlets
To install Inlets, you need to download the binary file from the official website. Open a terminal and run the following command to download the latest version of Inlets:
wget https://github.com/inlets/inlets/releases/download/{version_number}/inlets-pro
Replace "{version_number}" with the desired version number. You can find the latest version on the official website.
Once the download is complete, move the binary file to the user's home directory by running:
sudo mv inlets-pro /home/inlets
Make the binary file executable by running the following command:
sudo chmod +x /home/inlets/inlets-pro
Step 3: Configure Inlets
To configure Inlets, you need to create a YAML configuration file that describes the tunnel endpoint and the local service you want to expose.
Create a new file named "config.yaml" in the user's home directory by running the following command:
sudo nano /home/inlets/config.yaml
Add the following content to the file and replace the placeholders with your own values:
token: "your-token"
remote: "your-server-ip"
remote-port: "8000"
upstream: "127.0.0.1:80"
- Replace "your-token" with a strong token that will be used to authenticate the connection between the client and the server.
- Replace "your-server-ip" with the public IP address or domain name of your remote server where you want to receive traffic.
- Replace "8000" with the port number on the remote server where Inlets should listen for traffic.
- Replace "127.0.0.1:80" with the local IP address and port number of the service you want to expose.
Save and close the file by pressing "Ctrl + X", then "Y", and finally "Enter".
Step 4: Run Inlets
To start the Inlets server process, we will create a systemd service file.
Create a new file named "inlets.service" in the "/etc/systemd/system/" directory by running:
sudo nano /etc/systemd/system/inlets.service
Add the following content to the file:
[Unit]
Description=Inlets
After=network-online.target
[Service]
User=inlets
ExecStart=/home/inlets/inlets-pro server --config /home/inlets/config.yaml
[Install]
WantedBy=multi-user.target
Save and close the file.
Reload the systemd daemon and start the Inlets service by running:
sudo systemctl daemon-reload
sudo systemctl start inlets.service
Verify that the Inlets server is running by checking its status:
sudo systemctl status inlets.service
You should see a message that confirms that the Inlets server process is active and running.
Step 5: Connect to Inlets
To connect to the Inlets server from a client machine, you need to download and install the Inlets client binary file on the client machine following the same steps as above.
Once the client is installed, run the following command on the client machine to connect to the server and expose your local service:
inlets client --remote="your-server-ip" --remote-token="your-token" --upstream="http://127.0.0.1:80"
Replace "your-server-ip" and "your-token" with the same values you used in the server configuration file. Replace "127.0.0.1:80" with the local IP address and port number of the service you want to expose.
You should see a message that confirms that the Inlets client is connected to the server and the tunnel is established.
Conclusion
By following these simple steps, you can easily install and configure Inlets on OpenSUSE Latest to securely expose your local services to the internet.