Network broken (on VPS) - how to manually re-configure

NethServer Version: latest 7
Module: Email, SOGo

Hi folks,

I used the Email and SOGo modules in nethserver for many years in a local environment. After changing the internet provider I needed to migrate the server to a VPS at IONOS. I got it run to receive mails but sending was not possible. During my several tries to fix that situation, I broke the network configuration completely. I already tried to fix it with “restore-config” but that also failed. There must be a way to delete all the network interfaces and reconfigure them without having access to the mgmt site. I searched for days, but in the end, nethserver reconfigured always the broken network configuration (after running an signal-event interface-update or doing a reboot). I guess I missed something that clears the configuration correctly. After that I would start again with
https://wiki.nethserver.org/doku.php?id=virtual_network_interface&s[]=dummy

Do you have any suggestions what I have to do?

Thanks in advance!
regards
Sehne

a little update:

Right now I have no access via ssh or to the mgmt website - the former nic eth0 with the public ip was added to the bridge interface. I tried to delete the interface from the bridge and also the bridge itself but - as mentioned in the first comment - after an interface-update the configuration is like before.

I mistakingly added the red interface to the bridge when I broke the network configuration - and now I struggle in making this mistake undone :slight_smile: and several tries to do so, just made it worse I think. Anyways - I think I just have to delete the “wrong” network configuration and configure a new one. Unfortunately I do not know how to do so.

regards
Sehne

Since is a VPS, can you access this machine with the console? If yes, you can try to use network-recovery command, set a reachable IP address, and then access cockpit on this IP to reconfigure your network.

Hi Federico,

thanks for answering promptly. Yes, I have access to the console and I also tried the “network-recovery” script. I configured the public ip (x.x.x.x/32) but I still wasn’t able to connect to cockpit or via ssh. But I tried so many things - let me try it again this way. Is it possible to set dhcp instead of an ip? The VPS gets its ip via dhcp persistently.

Let you know how it went in a few minutes.

1 Like

I think you have to specify a static IP address…

ok, I tried as described, setting the public ip, but without success. I can’t open cockpit. network looks like

right now. If I could configure eth0 as it was before (no member of a bridge, configured for dhcp) - then the main problems should be resolved and I should be able to delete all the other bridges to start new.

Alright - step 1 done! :slight_smile:

I modified the file /var/lib/nethserver/db/networks manually so I now am able to connect to cockpit again.

When now clicking “network” in cockpit I see eth0 with the public IP and two green interfaces “br0” and “dummy0”. I remember that I saw just br0 before and dummy was a member of it. I think I should now be able to delete dummy0.

I now also receive mails again. Yeah - that’s a “half working” mailserver :wink: so last thing to do is to get the server sending mails to the internet. On port 465 with the let’s encrypt certificat which is already installed.

It seems to me that the mailserver tries to send via port 25 what most of the other mailservers don’t accept any more - or am I wrong here? In the log I see

connect to x.x.x.x:25 connection timed out

I can connect via telnet to port 25 and also to 465 on my mailserver but the difference is that only on port 25 I got the “helo” message.

Any ideas why?

Thanks and best regards
Sehne

ok - just realized that the nsdc is not yet working properly again. I can’t see addresses or mailboxes in cockpit. That seems to cause in the two green interfaces that are still existing.

I don’t get it. At the moment I cannot see any users, mailboxes or addresses in cockpit. When clicking “users” I see the configured nsdc, but no users. In shell nsdc also looks ok:

nsdc=service
IpAddress=192.168.111.11
ProvisionType=newdomain
bridge=br0
status=enabled

sssd the same - correct configuration. But still no users/addresses/mailboxes. But still receiving mail is possible. :thinking:

anyone an idea what to do to fix this behavior? I simply do not get any further.

Alright - finally I got the users. mailboxes and addresses back - most likely because of a config-restore without reconfiguring network - although the process failed. Anyways - now I am at this status, where everything seems to be working excapt sending emails to the world. Internal emails are deliverd properly but no emails are sent to external addresses - they still stuck in the queue.
Could it have something to do with the special network config in a VPS environment? I think about that dummy0 interface and that maybe the route the email has to take in the nethservers services is not correct?

I guess it is better to ask a new question and mark this one here as resolved - I got the network configuration done so the task asked in the title is solved.

regards
Sehne