Author Topic: Zentyal Install on AWS Ubuntu Server Kills SSH Access  (Read 749 times)

Gray

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Zentyal Install on AWS Ubuntu Server Kills SSH Access
« on: October 15, 2022, 05:50:27 pm »
Hi

I've built an Ubuntu 20.04 image on an Amazon Web Services EC2 Instance and installed Zentyal on it using the following process:-

1. Login to the Ubuntu Instance using SSH with ssh keys (into user ubuntu , no password)

2. sudo apt dist-upgrade

3. wget https://zentyal.com/zentyal_installer.sh

4. sudo chmod u+x zentyal_installer.sh

5. sudo ./zentyal_installer.sh

All goes well and I can login to the web admin page (:8443). I don't bother with any Zentyal configuration and terminate the web admin session.

However when I reboot the instance I can no longer login with SSH? In fact, the ubuntu instance is unreachable by any means and I have to delete the instance and start again.

What exactly is it in the install of Zentyal that affects SSH login? Anyone any idea? I've tried for a few hours to isolate and correct the problem but without luck.

Thanks

turalyon

  • Zen Warrior
  • ***
  • Posts: 197
  • Karma: +15/-0
    • View Profile
Re: Zentyal Install on AWS Ubuntu Server Kills SSH Access
« Reply #1 on: October 17, 2022, 01:28:14 pm »
Hi,

If you want to install Zentyal in a cloud provider, you need to install and configure the Network module before restarting the server, otherwise, the server will boot without an IP address, so, you will lose access. Also, I recommend setting up a static IP configured as 'internal'.

--

“This world is ours, and by the Holy Light we will keep it safe, now and forever".

Gray

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Zentyal Install on AWS Ubuntu Server Kills SSH Access
« Reply #2 on: October 17, 2022, 01:51:51 pm »
Ahh...  I see ... thanks .. I'm guessing there is a network module equivalent of :-

Code: [Select]
sudo apt-get install zenbuntu-desktop
Say,

Code: [Select]
sudo apt-get install zenbuntu-network
A quick

Code: [Select]
apt-cache search zentyal
reveals nothing?


There is a reference to extending the apt repositories with zentyal but I can't help but think it's well out-of-date? i.e.

deb http://archive.zentyal.org/zentyal <zentyal-version> main extra   

as that directory doesn't seem to exist?

Thanks

« Last Edit: October 17, 2022, 03:50:41 pm by Gray »

Gray

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Zentyal Install on AWS Ubuntu Server Kills SSH Access
« Reply #3 on: October 17, 2022, 04:47:44 pm »
Hi All

For those of you who, like me, do not have in-depth EC2/Linux knowledge, here's how I got the network module installed.....

Code: [Select]
sudo nano /etc/apt/sources.listnavigate to the end of the file and add the following line
Code: [Select]
deb http://packages.zentyal.org/zentyal 7.0 main extraCTRL + X and save the changes
reboot the instance, log back in and call
Code: [Select]
wget -q http://keys.zentyal.org/zentyal-7.0-packages-org.asc -O- | sudo apt-key add -then
Code: [Select]
sudo apt-get updateyou can then search for zentyal packages with
Code: [Select]
apt-cache search zentyalAmongst them you will see zentyal-network
Code: [Select]
sudo apt-get install zentyal-network

« Last Edit: October 18, 2022, 09:44:35 am by Gray »

turalyon

  • Zen Warrior
  • ***
  • Posts: 197
  • Karma: +15/-0
    • View Profile
Re: Zentyal Install on AWS Ubuntu Server Kills SSH Access
« Reply #4 on: October 18, 2022, 10:00:19 am »
Hi,

It shouldn't be necessary to install the package 'zentyal-network' itself. You can run the script zentyal_installer.sh and as soon as it finishes, you just need to login through Zentyal GUI using the Elastic IP of the EC2 instance, and then, configure the network module in the initial configuration wizard.

Once you have saved the changes and the network module is set up, you can reboot the EC2 instance to confirm the stability of the Zentyal server.

--

“This world is ours, and by the Holy Light we will keep it safe, now and forever".

Gray

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Zentyal Install on AWS Ubuntu Server Kills SSH Access
« Reply #5 on: October 18, 2022, 11:13:21 am »
Hi

Thanks for the update.

I've managed to get to that point i.e. where I can login to web admin and get to Zentyal's Network Module config. I've then set ETH0 as a static IP using the IP address and subnet mask as listed in the Ubuntu terminal with

Code: [Select]
ip a

In my case 172.31.92.23/20 is shown so I set zentyal using that IP address with a subnet mask off 255.255.240.0. This IP address has an Elastic address associated with it in the EC2 console.

Alas, as soon as I start the network module, connectivity is lost.

I've tried many different permutations .... maybe I need to use a different IP address to that Ubuntu has attached to its ETH0 (obviously with the same subnet)?

Thanks

turalyon

  • Zen Warrior
  • ***
  • Posts: 197
  • Karma: +15/-0
    • View Profile
Re: Zentyal Install on AWS Ubuntu Server Kills SSH Access
« Reply #6 on: October 19, 2022, 10:37:07 am »
Hi,

It looks like the actions you did are right. The Network configuration should be:

* Type: Internal
* IP: 172.31.92.23
* Subnet: 255.255.240.0
* Gateway: 172.31.X.X
* DNS: X.X.X.X

What modules do you have installed and enabled? Did you check if you are not blocking yourself with the firewall module?

Finally, did you try to connect to the EC2 instance using AWS EC2 Serial console when you lost the connection?

--

“This world is ours, and by the Holy Light we will keep it safe, now and forever".

Gray

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Zentyal Install on AWS Ubuntu Server Kills SSH Access
« Reply #7 on: October 19, 2022, 01:09:28 pm »
Hi

In my latest attempt; the EC2 console shows the Ubuntu Instance has having-

A private IP of 172.31.64.11 on subnet-044be0caa9b23a78c
Eth0 has a Network ID of eni-0d901ed7d3a3d7a2f on the same subnet
An Elastic IP associated to the above interface with a resulting Public IP of 54.158.XXX.XX (I've previously tried associating the Elastic IP to the instance which did not resolve the issue)

I can connect to the instance with both Session Manager and EC2 Instance Connect

I then:-
Upgraded the distribution with sudo apt list-upgrade
Added the Zentyal Distros to the sources.list inc keys
Updated apt with sudo apt-get update
Installed ONLY zentyal-network with sudo apt-get install zentyal-network (leaving port at default of 8443)
Updated the password for user ubuntu
Removed ufw (just in case) with sudo apt-get purge ufw
Checked the IP Address with ip a   which shows 172.31.64.11/20
Checked the Gateway address with route -n  which is 172.31.64.1

I can then log into web admin where I:-

Set the interface for eth0 with a static address of 172.31.64.11 (external left unticked)
Added a gateway of 172.31.64.1
Added a DNS of 172.31.0.2 and 8.8.8.8  (checked the 172 address from ipconfig on a Windows DHCP client)
Saved the changes
Enabled the network module and saved the changes.

At this point :-
webadmin is still responsive
EC2 Instance Connect is still responsive
Session Manager fails to connect

I then reboot the system from webadmin. When the instance restarts I cannot login via any of the three methods?

Has anyone successfully installed Zentyal on EC2? Maybe the network constraints of AWS are just incompatible with it?

Thanks






« Last Edit: October 20, 2022, 09:43:18 am by Gray »

Gray

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Zentyal Install on AWS Ubuntu Server Kills SSH Access
« Reply #8 on: October 24, 2022, 08:55:57 pm »
Hi

Any ideas on this anyone? In my last attempt, I merely installed zentyal-network via apt-get, rebooted the instance and can no longer ssh into the system. I didn't even get round to logging in to webadmin and configuring the network module. Just the simple act of installing zentyal-network and rebooting the server kills ssh access?

I've run out of ideas....

turalyon

  • Zen Warrior
  • ***
  • Posts: 197
  • Karma: +15/-0
    • View Profile
Re: Zentyal Install on AWS Ubuntu Server Kills SSH Access
« Reply #9 on: October 27, 2022, 04:20:34 pm »
Hi,

I tried to install Zentyal in AWS yesterday I did not have any issues. Below you have a few things I did:

* I create a Network Interface in AWS and set there a static IP (10.0.10.20).
* My Security group allows IMCP (echo request), SSH, 8443/TCP.
* The instance has an Elastic IP associated.
* The EC2 instance has the following settings:
  * Ubuntu Server 20.04 LTS (HVM), SSD Volume Type
  * Architecture 64-bit (x86)
  * Instance type: t3a.medium
  * Public subnet
  * Network interface created previously

And for the Zentyal, I installed it without GUI using the following script.

  * https://doc.zentyal.org/es/installation.html#instalacion-sobre-ubuntu-20-04-lts-server-o-desktop

Regarding the initial configuration, after login for the first time, I just installed the firewall module so I could configure the Network, which I set the following:

  * Internal
  * IP: 10.0.10.20
  * Netmask: 255.255.255.0
  * Gateway: 10.0.10.1
  * DNS: 8.8.8.8 , 8.8.4.4
 
Once I saved the changes, everything was working correctly, even after rebooting the server.

I hope this helps you.

--

“This world is ours, and by the Holy Light we will keep it safe, now and forever".