Kali Linux VPS for Free: A Segfault Tutorial That Makes It Possible
Segfault, created by The Hacker’s Choice, is a complimentary application for Cyber Security Researcher. It provides an unlimited server with Root access. With each new server that is generated, SSH connection is established for communal use.
Connecting to the Segfault Server
To log into Segfault, start by using the SSH command:
ssh root@segfault.net # The password is 'segfault'
When initially connecting to Segfault to open a root and SSH server, a 60-second wait is required. However, this duration is not typical for subsequent connections (probably less).
Once successfully connected to the server, it will provide details such as SSH and IP address. (It’s important to save this information for future reference.)
Later, to log in again, simply execute the SSH command provided below.
ssh -o "SetEnv SECRET=YOUR_KEY_PRIVATE" root@lulz.segfault.net
Once logged in, this Kali server can be utilized as a virtual machine equipped with a comprehensive suite of tools for security and networking, … (Segfault’s homepage for more details).
To log out of the server, simply use the exit command.
TUNNEL SERVER
Although the server we have is nearly identical to a real Kali Linux virtual machine, it can initiate connections from the inside, but external connections cannot reach it using common protocols like HTTP, TCP, etc. For this, I will need to utilize a powerful Cloudflare feature called Tunnel.
Argo Tunnel (Cloudflare Tunnel)
Initially, you must establish a tunnel from Cloudflare to the Kali Linux server using Zero Trust.
Create a tunnel
Name your tunnel
Install and run connectors
In the Choose your environment
options, select Debian — 64-bit.
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo dpkg -i cloudflared.deb
sudo cloudflared service install "YOUR_TOKEN_CLOUDFLARE" # Replace YOUR_TOKEN_CLOUDFLARE
Upon a successful connection, Connectors will display both ID and Status.
You should delete the old Cloudflare version on Segfault to install the new version (like the other version is being warned)
Route Traffic
In Route Traffic
, you must fill in the Domain (at least one domain is required) and the method + URL (localhost).
Use http.server
in background to tunnel from machine to cloudflare
When the http.server is running in the background, a Cloudflare tunnel can be configured to a domain
You can create an HTML file in the background to display a welcome page. :>
UPTIME Server
However, if the requirement is to establish a connection that remains active indefinitely, allowing applications to run continuously, what should be done?
According to the segfault announcement, the server will remain up as long as you are logged into the Segfault. This means your progress will be preserved as long as you maintain an SSH connection to segfault.net.
So we need to make something that can automatically connect “ssh” to the segfault server.
GITHUB ACTIONS
GitHub Actions is a complimentary service offered by GitHub that facilitates the automation of the CI/CD process. It enables users to create workflows that automate tasks within the software development lifecycle.
When you create a repository in Github, you can choose Actions to start Github Actions, choose the simple workflow.
I have created a YAML script to automate the process of repeatedly establishing an SSH connection with a set interval.
name: SEGFAULT
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '*/20 * * * *' # Restart each 20 minutes
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install sshpass
run: sudo apt-get install -y sshpass
- name: Connect to SSH and run command
# automatic connect ssh from github actions
run: |
sshpass -p "segfault" ssh -o "SetEnv SECRET=YOUR_KEY" -o "StrictHostKeyChecking=no" root@lulz.segfault.net "ls"
This workflow keeps the server connection alive by reconnecting every 20 minutes, ensuring your server remains active.
We have successfully established a continuous SSH connection to the server, ensuring it remains active for our needs.
Conclusion
By following these steps, you can set up a reliable, free Kali Linux environment using Segfault, create secure outbound tunnels, and maintain uptime indefinitely. Share this guide if it’s helpful!