• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Web servers software Directadmin

How to setup Directadmin on Google Compute Engine VM/ Amazon cloud?

How VPS by How VPS
November 17, 2019
in Directadmin, Web servers software
0
How to setup Directadmin on Google Compute Engine VM/ Amazon cloud?
0
SHARES
547
VIEWS
Share on FacebookShare on Twitter

How to setup Directadmin on Google Compute Engine VM/ Amazon cloud? To install Directadmin on VPS / Server of the hosting service providers is quite simple, but the deployment of Directadmin on Google Cloud or Amazon VPS is not the same as the instructions of the software manufacturer. After tinkering with trial installation, I have successfully installed Directadmin on Google Cloud VPS, so today I write “How to setup Directadmin on Google Compute Engine VM/ Amazon cloud” to guide people how to install Directadmin.

How to setup Directadmin on Google Compute Engine VM/ Amazon cloud

Open the necessary ports for VPS on Google Compute Engine VM/ Amazon cloud:

Contents

  1. How to setup Directadmin on Google Compute Engine VM/ Amazon cloud
    1. Open the necessary ports for VPS on Google Compute Engine VM/ Amazon cloud:
    2. Login SSH & Configure Network IP, Firewalld service:
    3. Add network eth0:0
    4. Setup DirectAdmin
    5. Configuration LAN & Directadmin
      1. Open ports for FTP

Ports to be opened include: 21,22,2222,35,000: 35999. Inside:
– Port 21 for FTP
– Port 22 and 35000: 35999 for SSH login
– Port 2222 for Directadmin login page

To open port, select Menu => VPC Network => Firewall Rule:

How to setup Directadmin on Google Compute Engine VM/ Amazon cloud?

Then click Create Firewall Rule:

 

Hướng dẫn cài đặt Directadmin trên VPS Google Cloud / AWS

Hướng dẫn cài đặt Directadmin trên VPS Google Cloud / AWS

 

First open port 21, you need to name the rule and select the same items as in the picture:

 

Hướng dẫn cài đặt Directadmin trên VPS Google Cloud / AWS

After filling and selecting items as in the picture, select Create.
Create the same rule for the remaining ports 22, 2222,35000: 35999.

Login SSH & Configure Network IP, Firewalld service:

– If you cannot login SSH in the usual way, you can refer to the article How to login using SSH for my Google Cloud (Google VPS).
Login as root:

sudo -s

Stop Firewalld:

systemctl mask firewalld
systemctl stop firewalld

Then I followed on CentOS 7, xfs is used by default and Quotas are not activated, so you need to enable them manually

nano /etc/default/grub

add quota options rootflags=usrquota,grpquota into the end of GRUB_CMDLINE_LINUX line, it will look like this

GRUB_CMDLINE_LINUX="crashkernel=auto console=ttyS0,38400n8 rootflags=usrquota,grpquota"

Make a backup

cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.back

Generate a new configuration file:

grub2-mkconfig -o /boot/grub2/grub.cfg

Restart the server, the root directory will be mounted with required options. We can check by running this command

mount | grep '/'

If you see:

/dev/xvda1 on / type xfs (rw,relatime,attr2,inode64,usrquota,grpquota)

That means you have successfully configured.

Add network eth0:0

By default, GCP use private IP for eth0, to install DirectAdmin, we need to use the public IP

nano /etc/sysconfig/network-scripts/ifcfg-eth0:0

Enter the following content

DEVICE=eth0:0
BOOTPROTO=none
ONPARENT=yes
IPADDR=xxx.xxx.xxx.xxx
NETMASK=255.255.255.0
ONBOOT=yes

where xxx.xxx.xxx.xxx is your AWS Public IP, then restart the network

/etc/init.d/network restart

If you wish to you IPv6, set your eth0:0 live below:

IPV6INIT="yes"
IPV6ADDR=2600:1f16:xxxxxxxxxxxx

Setup DirectAdmin

Run this command:

echo 1 > /root/.lan
wget http://www.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh

To install Directadmin, please refer to our article: How to install Directadmin on Linux?

Note: And follow the instructions. Note when you asked for the network, enter eth0:0

Configuration LAN & Directadmin

Since GCP run on a LAN/NAT and behind the firewall, we need to do some config.

Enable LAN

nano /usr/local/directadmin/conf/directadmin.conf

Add this value lan_ip=yyy.yyy.yyy.yyy where yyy.yyy.yyy.yyy is your GCP Private IP
Link the Private IP to your Public IP using the DA Linked IP feature

  • Add the LAN IP to DA’s IP manager. Don’t assign it to any Users or Domains.
  • View the details of the external IP: Admin Level -> IP Manager -> Click the public/external IP.
  • Link the internal IP to the external IP: Select the LAN IP from the drop down.
  • Only select Apache, do not select DNS

Hướng dẫn cài đặt Directadmin trên VPS Google Cloud / AWS

Hướng dẫn cài đặt Directadmin trên VPS Google Cloud / AWS

Run:

service directadmin restart

Open ports for FTP

I like to use (https://www.configserver.com/cp/csf.html) to manage my firewall settings on command line and via DA.

If you use ProFTPD, edit it’s configure file:

nano /etc/proftpd.conf

Add after PassivePorts: MasqueradeAddress xxx.xxx.xxx.xxx where xxx.xxx.xxx.xxx is your AWS Public IP

Add rule to the iptables

iptables -I INPUT -p tcp –dport 35000:35999 -j ACCEPT

nano /usr/libexec/iptables/iptables.init

add $IPTABLES -A INPUT -p tcp –dport 35000:35999 -j ACCEPT below the ftp section, like this

#########################
# ftp
$IPTABLES -A INPUT -p tcp --dport 21 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 35000:35999 -j ACCEPT

 

Previous Post

How to install Zabbix on CentOS 7

Next Post

Install and manage servers easily with HocVPS Script

Next Post
Install and manage servers easily with HocVPS Script

Install and manage servers easily with HocVPS Script

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet