Tunnelling - rathole client
- get rathole
wget -O $HOME/suda-git/rathole-x86_64-unknown-linux-gnu.zip https://github.com/rapiz1/rathole/releases/download/v0.4.7/rathole-x86_64-unknown-linux-gnu.zip
- make a directory for rathole
mkdir $HOME/rathole
- unzip the archive into that directory
unzip -q $HOME/suda-git/rathole-x86_64-unknown-linux-gnu.zip -d $HOME/rathole
- make the binary executable
sudo chmod +x $HOME/rathole/rathole
- move the binary to /usr/bin/ so it's accessible
sudo mv $HOME/rathole/rathole /usr/bin/
- make a directory that will hold the rathole configuration
sudo mkdir -p /etc/rathole
- copy configuration files to /etc/rathole
sudo cp $HOME/suda-git/config/app1c.toml /etc/rathole/app1.toml
sudo cp $HOME/suda-git/config/app2c.toml /etc/rathole/app2.toml
sudo cp $HOME/suda-git/config/app3c.toml /etc/rathole/app3.toml
- copy systemd service files to /etc/systemd/system
sudo cp $HOME/suda-git/config/ratholec@.service /etc/systemd/system/
- define $secret (needs to be the same string as on the server install)
secret="the_string_from_the_server(witout_quotes)"
- use sed to replace "hackme" with the secret string in the config files
sudo sed -i "s/hackme/$secret/g" /etc/rathole/app1c.toml
sudo sed -i "s/hackme/$secret/g" /etc/rathole/app2c.toml
sudo sed -i "s/hackme/$secret/g" /etc/rathole/app3c.toml
- app1capp1 - noVNC service running on the client machine on port 443
- app2capp2 - icecast streaming service running on the client machine on port 8443
- app3capp3 - icecast admin backing service running on the client on port 8080
- enable theserathole servicesinstances with the appropriate config file for each service
sudo systemctl enable ratholec@app1 --now
sudo systemctl enable ratholec@app2 --now
sudo systemctl enable ratholec@app3 --now