Docs
DataCrunch HomeSDKAPILogin / Signup
  • Welcome to DataCrunch
    • Overview
    • Locations and Sustainability
    • Support
  • GPU Instances
    • Set up a GPU instance
    • Securing Your Instance
    • Shutdown, Hibernate, and Delete
    • Adding a New User
    • Block Volumes
    • Shared Filesystems (SFS)
    • Managing SSH Keys
    • Connecting to Your DataCrunch.io Server
    • Connecting to Jupyter notebook with VS Code
    • Team Projects
    • Pricing and Billing
  • Clusters
    • Instant Clusters
      • Deploying a GPU cluster
      • Slurm
      • Spack
      • Good to know
    • Customized GPU clusters
  • Containers
    • Overview
    • Container Registries
    • Scaling and health-checks
    • Batching and Streaming
    • Async Inference
    • Tutorials
      • Quick: Deploy with vLLM
      • In-Depth: Deploy with TGI
      • In-Depth: Deploy with SGLang
      • In-Depth: Deploy with vLLM
      • In-Depth: Deploy with Replicate Cog
      • In-Depth: Asynchronous Inference Requests with Whisper
  • Inference
    • Overview
    • Authorization
    • Audio Models
      • Whisper X
  • Pricing and Billing
  • Resources
    • Resources Overview
    • DataCrunch API
  • Python SDK
  • Get Free Compute Credits
Powered by GitBook
On this page

Was this helpful?

  1. GPU Instances

Securing Your Instance

Securing your instance using fail2ban and ufw

Last updated 9 months ago

Was this helpful?

When ordering a server on , you might want to look into securing your instance.

We will install and configure fail2ban & ufw. This guide assumes you are logged in as a non-root user. If logged in as root, you do not need to prepend the commands with sudo.

sudo apt update
sudo apt install fail2ban
sudo systemctl start fail2ban
sudo systemctl enable fail2ban
sudo apt install ufw
sudo ufw allow ssh
sudo ufw enable
  • Fail2ban will block IP addresses that continuously attempt to connect to your machine in the hopes of finding a weak password, for example.

  • Ufw is a firewall management tool that will block access to all ports unless otherwise specified.

ufw with default settings . In case you plan to run Docker containers on your instance, please make sure to configure your firewall rules appropriately.

That's all! Your VPS is now equipped with a firewall and basic protection against automated machines trying to break in. Check your firewall status and fail2ban status with respective commands:

sudo ufw status
sudo fail2ban-client status
sudo fail2ban-client status sshd

You might be surprised how many bad actors are trying to obtain access to your server!

Connecting to JupyterLab securely

If you want to run a service like Jupyter Notebook, you will need to forward a port from your local computer over the SSH for that. The default port for Jupyter Notebook is 8888

To have the port forward, please add the forwarding options to the SSH command:

ssh -L 8888:localhost:8888 root@IP_OF_YOUR_INSTANCE
DataCrunch.io
will not block traffic to Docker