After installation on ArubaCloud, server is not reachable

ARUBACLOUD :

[root@nethserver network-scripts]# ip ro
86.105.52.0/24 dev eth0 proto kernel scope link src 86.105.52.137
169.254.0.0/16 dev eth0 scope link metric 1002
default via 86.105.52.1 dev eth0

So after installation on clean CentOS, server is not reachable.

Forgive me my ignorance, but this looks like an apipa address.
What is now the external IP address of the VPS? is that 86.105.52.1? or 86.105.52.137?

Hi @giacomo, @filippo_carletti @stephdl

Please review the code of the script, because it does not work properly.

/actions/nethserver-base-initialize-db

We simply need to parse file by line and add it into db networks , even dhcp interfaces will work proper.

I did some tests with a DHCP green, but it didn’t work properly. Unfortunately I didn’t access to the vps console, I saw only that nethserver had problems when the ip changed. I tried to add a script to compare ip in the db and ip obtained via dhcp, and correct the db if needed, but I lost access.

I agree that dhcp on vps is a scenario we need to support perfectly.
Since dhcp is supported on red, we could find a way to build a red-only system. Or assign the green role to a “virtual card”.

Hi @filippo_carletti,

So I need to summarize some points that we need to achieve:

  1. On clean VPS CentOS system, we need to parse the ifcfg-eth* files and add entries to db, one by one, in order not to lose our system after reboot.

  2. If the interface has Bootproto dhcp, we need to parse this entry as well:

    db networks setprop eth0 bootproto dhcp

  3. As far as on VPS we have only one ethernet adapter while setting up the Hostname and TZ we can choose VPS role, and this role will create an alias or virtual Green interface.

  4. Despite one interface we can not to change green role, but we need to add restrictions to some services like MySQL, LDAP, etc.

Due to aforesaid, our primary aim does not lose connection to the server.

The red-only scenario is not a viable option, we already did some tests in the past.
We must stick on a green-only configuration with a static IP address.
Maybe we could fake somehow the dhcp scenario, by running dhclient for the green interface and saving the current ip address inside the db. Also the system must ignore dhcp renewal for green interfaces.

This can be done.

I agree, if this option is set, the system must be configured in a peculiar way.

This is a wrong assumption. For example, on Rackspace (which is a big VPS player) the server has 2 interfaces: one for the outside world and one for connecting to other vm inside the same data center.
Beside this, I don’t get what is the purpose of a virtual green interface. Could you make an example?

This is much work distributed across many package. I’d propose a simple documentation with some cut&paste commands to harden the system if installed on a VPS.

1 Like

Yes Aruba gives 2 interfaces too, but OVH provides only 1 interface, so

It is a good assumption, instead of refactoring a big amount of code.

Finally :

We agreed that interface configuration should be parsed and as for other settings they should be done depending on VPS provider and particular scenario.

I finally had some time to try a fix which should work on NS 7.
See the following issue for the patch: https://github.com/NethServer/dev/issues/5032.

Still my implementation lacks web interface support, but we could already do some tests.
The implementation doesn’t parse any ifcfg file, but uses the dynamic flag present inside the ip address show command output.

Would you like to try it? :wink:

1 Like

Pls make backport on 6.7 :slight_smile: