Techridez
VirtualizationLinuxWindowsNetworking
  • Techridez Knowledge base
  • Techridez guide
  • Tech Scale
    • Measurements
  • Techridez Knowledge Base
  • Bacis
    • Protocol and Port Numbers
  • Windows Customization
    • Capture Wim image from OS
  • Virtualization
    • Proxmox Command Guide
  • Windows Server Guide
    • Transfer FSMO roles
    • FSMO commands
  • DevOps
    • WebDev
      • How to install fail2ban on ubuntu server and create custom jail config.
      • MySQL Bin Files Eating Lots of Disk Space (fix)
      • Install ClamAV antivirus in Ubuntu Server and Client With Cron job
      • 404 hyperlink not working after wordpress migration
      • Apache Virtual Host Script with mysql db.
      • OsTicket
      • How to Backup MySQL Databases Automatically on Ubuntu
      • Cron Job
        • Create cron job for maldet scanning
        • Auto-Restart MySQL When It Crashes During a Brute Force Attack
        • How to change default crontab editor
        • How To Use Cron to Automate Tasks on Ubuntu 18.04
        • How To Use Cron to Automate Tasks on CentOS 8
      • Wordpress Security
      • Open database Error!: could not find driver linux Fix
    • Vagrant
    • Windows Subsystem for Linux
    • How to set static ip on ubuntu server using yaml file.
    • How to install ansible
  • Linux
    • Tools
    • How to install CrowdStrike in Linux
    • How to Install Ossec agent in linux
    • Linux Commands
    • SFTP (CrushFTP)with HA
    • 🗃️Transfer & sync files in a directory to remote node using crontab & rsync
  • Networking
    • Upgrade Cisco9200L firmware to recommended
  • Cyber Security
    • ISC² (International Information System Security Certification Consortium)
Powered by GitBook

©️ Techridez

On this page
  • CrushFTP
  • Setup HA using Keepalived

Was this helpful?

  1. Linux

SFTP (CrushFTP)with HA

PreviousLinux CommandsNextTransfer & sync files in a directory to remote node using crontab & rsync

Last updated 1 year ago

Was this helpful?

Services to be used

  • Keepalived

  • CrushFTP

  • crontab

CrushFTP

Install CrushFTP using this tutorial

Setup HA using Keepalived

HA with Keepalived concept
                           /---> SF1 [active]
                          /      |
                         /       |
Service request ----> Virtual IP     (VRRP)
                         .       |
                          .      |
                           . . > SF2 [passive]

Lets configure HA

Hostname
IP
Role

SF1

192.168.4.231

Master

SF2

192.168.4.232

Slave

VIP

192.168.4.235

VIP

type ip a in terminal to find IP address of you hosts, install below mentioned packages in your servers.

sudo yum update
sudo yum install keepalived
sudo yum install libipset13

edit your config, I am using nano as editor because I am using Ubuntu.

sudo nano /etc/keepalived/keepalived.conf

First node

/etc/keepalived/keepalived.conf
vrrp_instance VI_1 {
  state MASTER
  interface 
  virtual_router_id 55
  priority 150
  advert_int 1
  unicast_src_ip 192.168.4.231
  unicast_peer {
    192.168.4.232
  }

  authentication {
    auth_type PASS
    auth_pass 
  }

  virtual_ipaddress {
    192.168.4.235/24
  }
}

Second node

/etc/keepalived/keepalived.conf
vrrp_instance VI_1 {
  state BACKUP
  interface 
  virtual_router_id 55
  priority 100
  advert_int 1
  unicast_src_ip 192.168.4.232
  unicast_peer {
    192.168.4.231
  }

  authentication {
    auth_type PASS
    auth_pass 
  }

  virtual_ipaddress {
    192.168.4.235/24
  }
}

Start and enable the service

sudo systemctl enable --now keepalived.service

Stopping the service

sudo systemctl stop keepalived.service

Starting the service

sudo systemctl start keepalived.service

get the status

sudo systemctl status keepalived.service
concept