Koozali.org: home of the SME Server

Loosing internet connection after post-upgrade of server

Offline beast

  • *
  • 238
  • +0/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #15 on: July 25, 2021, 07:27:03 AM »
1- did you do post-upgrade reboot after restoring before that? this is neeeded in order to have your services restored. 

Not by typing it on the command line. Here last time during GUI installation I make a internet connection by setting up the network (dhcp client). The server ask for a reboot at the end of the GUI installation. It reboot and at the end of the boot process it ask for a possible restore disk that I accept. I disconnect the internet cable during the restore as I do not what any conflicts with the current running server. After some hours and another automatic reboot/reconfiguration I then go to the server console directly on the server to disable DHCP and give it another name and IP so it will not conflict with the current server and reconnect the network cable. Then I have the problem. I have tried this in other combinations, but do not remember all details any more. An update at this point on the command line do not improve on the situation and also not possible because of the situation (I have to reconfigure dns first).

NB: I also have to remove template files in httpd.conf to make httpd work and disable nut as I have a UPS running on the old server (gives errors on the command line and console and is quite annoying)

2- can you elaborate the no connectivity.
what returns ifconfig? are you able to ping an external ip ? are you able to resolve a domain  dig google.com?

I am as reported able to ping 8.8.8.8 but not google.com. When I ping a domain name it return with an error text after a long timeout that there is a temporary error in the domain name lookup (translated from Danish). From the outside (another pc) I am not able to ping the ip of the server even on the same subnet. ifconfig looks normal to me. I had to reconfigure dns to get access not to retype everything.

Code: [Select]
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.11.12  netmask 255.255.255.0  broadcast 192.168.11.255
        ether 30:85:a9:3c:51:6c  txqueuelen 1000  (Ethernet)
        RX packets 4567  bytes 872505 (852.0 KiB)
        RX errors 0  dropped 3237  overruns 0  frame 0
        TX packets 69  bytes 10194 (9.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 217  bytes 14676 (14.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 217  bytes 14676 (14.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #16 on: July 25, 2021, 09:45:55 AM »
After some hours and another automatic reboot/reconfiguration I then go to the server console directly on the server to disable DHCP and give it another name and IP so it will not conflict with the current server and reconnect the network cable. Then I have the problem.

Which is to be expected.

What is IP of the old SME9 server?

IP of the new SME10 server is  192.168.11.12

What is the gateway IP?

--
qui scribit bis legit

Offline beast

  • *
  • 238
  • +0/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #17 on: July 25, 2021, 11:22:14 AM »
Which is to be expected.

What is IP of the old SME9 server?

IP of the new SME10 server is  192.168.11.12

What is the gateway IP?

Old SME9 server is 192.168.11.11
Gateway is 192.168.11.1

192.168.11.12 is the same IP as the server had when it was running as a Affa backup sever but I have also tried with other IP

Offline beast

  • *
  • 238
  • +0/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #18 on: July 25, 2021, 11:27:30 AM »
Old SME9 server is 192.168.11.11
Gateway is 192.168.11.1

192.168.11.12 is the same IP as the server had when it was running as a Affa backup sever but I have also tried with other IP

DHCP range is 100 to 200

Offline Jean-Philippe Pialasse

  • *
  • 2,746
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Loosing internet connection after post-upgrade of server
« Reply #19 on: July 25, 2021, 12:57:27 PM »
i see dns resolution is an issue.

i see it can ping to external ip. so network connectivity is not an issue, the issue is dhcp resolution. 

so my guess and only a guess because you did not tell us yet at the 2nd page of discussion : you set the ip being 11.12. the gateway being 11.1 and what do you set as dns server first ?


also from my understanding you are rebooting and then pluging the cable ?  have you tried a simple reboot without reconfiguring after pluging the cable ?

could you do

systemctl status -l dnscache
systemctl status -l dnscache.forwarder
systemctl status -l masq
systemctl status -l network

iptables -L

just after pluging back the network cable after initial configuration to new ip and reboot

then try

systemctl restart network masq dnscache dnscache.forwarder
« Last Edit: July 25, 2021, 01:02:11 PM by Jean-Philippe Pialasse »

Offline beast

  • *
  • 238
  • +0/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #20 on: July 25, 2021, 01:01:41 PM »
so my guess and only a guess because you did not tell us yet at the 2nd page of discussion : you set the ip being 11.12. the gateway being 11.1 and what do you set as dns server first ?

At first I do not set anything in dns and it does not work. Then I have to set it to for example 1.1.1.1 in the console and the network is working again. Then I can reconfigure it to an empty string and it keeps working. First time I make a post-upgrade of server it does not work again and I have to make the server console procedure again.

Offline beast

  • *
  • 238
  • +0/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #21 on: July 25, 2021, 01:09:32 PM »
At first I do not set anything in dns and it does not work. Then I have to set it to for example 1.1.1.1 in the console and the network is working again. Then I can reconfigure it to an empty string and it keeps working. First time I make a post-upgrade of server it does not work again and I have to make the server console procedure again.

DNS entry is empty on the old server and also empty at the first reconfiguration to disable dhcp and change ip.

Offline beast

  • *
  • 238
  • +0/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #22 on: July 25, 2021, 02:47:24 PM »
also from my understanding you are rebooting and then pluging the cable ?  have you tried a simple reboot without reconfiguring after pluging the cable ?

could you do

systemctl status -l dnscache
systemctl status -l dnscache.forwarder
systemctl status -l masq
systemctl status -l network

iptables -L

just after pluging back the network cable after initial configuration to new ip and reboot

then try

systemctl restart network masq dnscache dnscache.forwarder

I had to do a post-upgrade to get the machine into the problem condition as I do not have time right now to do a full install/restore.

BTW: Will not be on location the next 3 days

systemctl restart network masq dnscache dnscache.forwarder did not help - at least still unable to ping google.com

● networking.service - Network management for Koozali SME Server, using old sysvinit script
   Loaded: loaded (/usr/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: active (exited) since søn 2021-07-25 14:24:16 CEST; 5min ago
  Process: 1385 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)
 Main PID: 1385 (code=exited, status=0/SUCCESS)
   Memory: 4.0K
   CGroup: /system.slice/networking.service

jul 25 14:24:10 beastserver2.beast2.dk systemd[1]: Starting Network management for Koozali SME Server, using old sysvinit script...
jul 25 14:24:11 beastserver2.beast2.dk network[1385]: Sætter loopback-grænsefladen i drift:  [  O.k.  ]
jul 25 14:24:16 beastserver2.beast2.dk network[1385]: Sætter grænseflade enp4s0 i drift:  [  O.k.  ]
jul 25 14:24:16 beastserver2.beast2.dk systemd[1]: Started Network management for Koozali SME Server, using old sysvinit script.

● masq.service - masq, the Koozali SME Server firewall script
   Loaded: loaded (/usr/lib/systemd/system/masq.service; disabled; vendor preset: disabled)
   Active: active (exited) since søn 2021-07-25 14:24:10 CEST; 4min 46s ago
  Process: 1219 ExecStart=/etc/rc.d/init.d/masq start (code=exited, status=0/SUCCESS)
  Process: 1209 ExecStartPre=/sbin/e-smith/service-status masq (code=exited, status=0/SUCCESS)
 Main PID: 1219 (code=exited, status=0/SUCCESS)
   Memory: 0B
   CGroup: /system.slice/masq.service

jul 25 14:24:09 beastserver2.beast2.dk systemd[1]: Starting masq, the Koozali SME Server firewall script...
jul 25 14:24:09 beastserver2.beast2.dk service-status[1209]: masq status not enabled in configuration db.
jul 25 14:24:10 beastserver2.beast2.dk masq[1219]: Enabling IP masquerading: done
jul 25 14:24:10 beastserver2.beast2.dk systemd[1]: Started masq, the Koozali SME Server firewall script.


● dnscache.forwarder.service - dnscache.forwarder,
   Loaded: loaded (/usr/lib/systemd/system/dnscache.forwarder.service; enabled; vendor preset: enabled)
   Active: active (exited) since søn 2021-07-25 14:24:10 CEST; 4min 25s ago
  Process: 1461 ExecStart=/usr/bin/sv u /service/dnscache.forwarder (code=exited, status=0/SUCCESS)
  Process: 1351 ExecStartPre=/sbin/e-smith/service-status dnscache.forwarder (code=exited, status=0/SUCCESS)
 Main PID: 1461 (code=exited, status=0/SUCCESS)
   Memory: 0B
   CGroup: /system.slice/dnscache.forwarder.service

jul 25 14:24:10 beastserver2.beast2.dk systemd[1]: Starting dnscache.forwarder,...
jul 25 14:24:10 beastserver2.beast2.dk systemd[1]: Started dnscache.forwarder,.

● dnscache.service - dnscache,
   Loaded: loaded (/usr/lib/systemd/system/dnscache.service; enabled; vendor preset: enabled)
   Active: active (exited) since søn 2021-07-25 14:24:10 CEST; 3min 53s ago
  Process: 1486 ExecStart=/usr/bin/sv u /service/dnscache (code=exited, status=0/SUCCESS)
  Process: 1372 ExecStartPre=/sbin/e-smith/service-status dnscache (code=exited, status=0/SUCCESS)
 Main PID: 1486 (code=exited, status=0/SUCCESS)
   Memory: 0B
   CGroup: /system.slice/dnscache.service

jul 25 14:24:10 beastserver2.beast2.dk systemd[1]: Starting dnscache,...
jul 25 14:24:10 beastserver2.beast2.dk systemd[1]: Started dnscache,.

Chain INPUT (policy DROP)
target     prot opt source               destination         
state_chk  all  --  anywhere             anywhere           
local_chk  all  --  anywhere             anywhere           
denylog    all  --  224.0.0.0/4          anywhere           
denylog    all  --  anywhere             224.0.0.0/4         
InboundICMP  icmp --  anywhere             anywhere           
denylog    icmp --  anywhere             anywhere           
InboundTCP  tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN
denylog    tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN
InboundUDP  udp  --  anywhere             anywhere           
denylog    udp  --  anywhere             anywhere           
denylog    all  --  anywhere             anywhere           

Chain FORWARD (policy DROP)
target     prot opt source               destination         
state_chk  all  --  anywhere             anywhere           
SMTPProxy  tcp  --  anywhere             anywhere             tcp dpt:smtp
local_chk  all  --  anywhere             anywhere           
ForwardedTCP  tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN
ForwardedUDP  udp  --  anywhere             anywhere           
denylog    all  --  anywhere             anywhere           

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
denylog    all  --  224.0.0.0/4          anywhere           
denylog    all  --  anywhere             224.0.0.0/4         
ACCEPT     all  --  anywhere             anywhere           

Chain ForwardedTCP (1 references)
target     prot opt source               destination         
ForwardedTCP_1  tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN
denylog    tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN

Chain ForwardedTCP_1 (1 references)
target     prot opt source               destination         

Chain ForwardedUDP (1 references)
target     prot opt source               destination         
ForwardedUDP_1  udp  --  anywhere             anywhere           
denylog    udp  --  anywhere             anywhere           

Chain ForwardedUDP_1 (1 references)
target     prot opt source               destination         

Chain InboundICMP (1 references)
target     prot opt source               destination         
InboundICMP_1  icmp --  anywhere             anywhere           
denylog    icmp --  anywhere             anywhere           

Chain InboundICMP_1 (1 references)
target     prot opt source               destination         

Chain InboundTCP (1 references)
target     prot opt source               destination         
InboundTCP_1  tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN
denylog    tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN

Chain InboundTCP_1 (1 references)
target     prot opt source               destination         

Chain InboundUDP (1 references)
target     prot opt source               destination         
InboundUDP_1  udp  --  anywhere             anywhere           
denylog    udp  --  anywhere             anywhere           

Chain InboundUDP_1 (1 references)
target     prot opt source               destination         

Chain SMTPProxy (1 references)
target     prot opt source               destination         

Chain SSH_Autoblock (0 references)
target     prot opt source               destination         
SSH_Whitelist  tcp  --  anywhere             anywhere             tcp dpt:ssh state NEW
           all  --  anywhere             anywhere             recent: SET name: SSH side: source mask: 255.255.255.255
denylog    all  --  anywhere             anywhere             recent: CHECK seconds: 900 hit_count: 4 TTL-Match name: SSH side: source mask: 255.255.255.255

Chain SSH_Whitelist (1 references)
target     prot opt source               destination         
SSH_Whitelist_1  all  --  anywhere             anywhere           

Chain SSH_Whitelist_1 (1 references)
target     prot opt source               destination         

Chain denylog (15 references)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere           
DROP       all  --  anywhere             anywhere           
DROP       all  --  anywhere             anywhere           
DROP       all  --  anywhere             anywhere           
DROP       all  --  anywhere             anywhere           

Chain local_chk (2 references)
target     prot opt source               destination         
local_chk_1  all  --  anywhere             anywhere           

Chain local_chk_1 (1 references)
target     prot opt source               destination         

Chain state_chk (2 references)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED

« Last Edit: July 25, 2021, 02:48:56 PM by beast »

Offline beast

  • *
  • 238
  • +0/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #23 on: July 25, 2021, 02:57:23 PM »

also from my understanding you are rebooting and then pluging the cable ?  have you tried a simple reboot without reconfiguring after pluging the cable ?


Do not understand what to do differently here?

Offline Jean-Philippe Pialasse

  • *
  • 2,746
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Loosing internet connection after post-upgrade of server
« Reply #24 on: July 25, 2021, 06:59:37 PM »
this is a server. not a laptop.
it is intended to always be connected.
so network cable connected before you reboot, not after boot process has ended.

but from what i understand you have not actually tried to reinstall the server but only reconfigured it a couple of times with or without 1.1.1.1 as dns server?

and when no dns server is set no dns resolution is possible.

what is acting as router ? SME should be able to act as its own dns server unless something blocks him, or some situation prevent the solver to start (eg no network on boot).

also why not using the other SME as DNS solver or the router rather than 1.1.1.1?

what is the dns setting for your SME 9



Offline beast

  • *
  • 238
  • +0/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #25 on: July 26, 2021, 09:25:59 AM »
this is a server. not a laptop.
it is intended to always be connected.
so network cable connected before you reboot, not after boot process has ended.

but from what i understand you have not actually tried to reinstall the server but only reconfigured it a couple of times with or without 1.1.1.1 as dns server?

and when no dns server is set no dns resolution is possible.

what is acting as router ? SME should be able to act as its own dns server unless something blocks him, or some situation prevent the solver to start (eg no network on boot).

also why not using the other SME as DNS solver or the router rather than 1.1.1.1?

what is the dns setting for your SME 9

I know it is a server and the network cable is only disconnected shortly during restore and until I get the server settings changed so it is not the same settings as the old server (conflict). One time I actually forgot it.

I have done a complete install of SME10 and restore from USB disk at least 4 times now. One time was with the text installer. Always with the same result of dsn problems.  I have now made a new backup disk just to make sure this is not the problem (but I really do not think so)

The old SME9 have a empty field for the dns setting. As far as I understand this means that it takes the dns settings from a root dns server somehow. There is also a short delay before internet is working in this case.

Both server are connected to a Linksys dual WAN router (244 I think). Never seen a problem with this and it works fine for the old SME9. So both servers are setup as server only.

The only reason I key in 1.1.1.1 is to get dns to work (I remove it again and I just have to key in something). The plan is to take the old server down when I have a working upgrade path.
« Last Edit: July 26, 2021, 09:28:45 AM by beast »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #26 on: July 26, 2021, 10:27:17 AM »
Be careful with your network addressing.

Quote
    192.168.11.12 is the same IP as the server had when it was running as a Affa backup sever but I have also tried with other IP

Think you might have some sort of collision going on. Be very specific about exactly what IPs are used and how.

Quote
DHCP range is 100 to 200

Don't run DHCPD on both servers on the same network.

Quote
it takes the dns settings from a root dns server somehow

Yes SME is perfectly capable or resolving DNS by itself with no input from you, all things being equal and other parts of your network work correctly eg - firewall correctly set up.

You should not be modifying settings unless you absolutely know what you are doing, and why.

So with server only, and your router, have you allowed DNS traffic from the v10 server? You haven't mentioned that (or a lot of other information) so it is hard to know - I strongly suspect we only have half the story here which is why everyone is struggling to give you a solution.

============


Go back to basics. Do small steps. Check carefully and methodically and take lots of notes.

Install a clean SME v10 with some dummy settings, manual IP address, no dhcpd etc.

Make sure it all works before you do anything else. Reconfigure/reboot a few times. Do not do anything else until this all works happily.

Better check your v9 box too so we know what you are restoring.

/sbin/e-smith/audittools/newrpms
/sbin/e-smith/audittools/templates

Take down your v9 box and then restore the v10 so you do not get an IP clash.

Make sure there are no custom templates anywhere.

Reconfigure/reboot and test etc.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline sages

  • *
  • 182
  • +0/-0
    • http://www.sages.com.au
Re: Loosing internet connection after post-upgrade of server
« Reply #27 on: July 26, 2021, 10:46:48 AM »
And to add to ReetP's post above:
The default root servers are here /etc/e-smith/templates/var/service/dnscache.forwarder/root/servers
from what I have observed if you set a corporate DNS server this will be replaced as the template is expanded.
resolve.conf points to the local IP for dns resolution via the dnscache service.
The config for this ends up here /var/service/dnscache.forwarder after the requisite templates are expanded.
Look here /etc/e-smith/templates/var/service/dnscache.forwarder/root/servers to see what the root name servers are configured as. With no DNS set it should have ~ 13 entries in it (from what I can see in the templates), when you set a DNS then that is what you should see in the root server file.
Try some traceroutes from the SME to see if DNS servers are allowed by your network.


That said, installing the dev samba packages stuff this up (as well as other things as has been previously mentioned).
A configuration from a previous sme install shouldn't break DNS. Others have numerous SME10 installs and haven't seen this issue, this suggests that there is something different about your system that isn't obvious to the people trying to help you. We need more clues :)
...

Offline beast

  • *
  • 238
  • +0/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #28 on: July 26, 2021, 02:03:07 PM »
Be careful with your network addressing.

Think you might have some sort of collision going on. Be very specific about exactly what IPs are used and how.

I am very careful and have a documented IP layout. 192.168.11.12 has always been in use for this machine, but I have tried with another IP just to be on the safe side.

Don't run DHCPD on both servers on the same network.

I do not run it on both servers. I only run it on the old SME9 server

Yes SME is perfectly capable or resolving DNS by itself with no input from you, all things being equal and other parts of your network work correctly eg - firewall correctly set up.

I know, but I have found out that I am able to make it work temporary by setting for example 1.1.1.1 as dns in the admin server console and then remove it again - do not know why. But post-update break it again so I guess that somewhere there is a "template" that state something wrongly for the server.

You should not be modifying settings unless you absolutely know what you are doing, and why.

I do not change anything. Only try out things to try and make it work again. It is very simple. I make a clean install of SME10. Upgrade from SME9 via USB disk backup. Reconfigure in admin server console not to have a conflict with the current server and then I have the issue

So with server only, and your router, have you allowed DNS traffic from the v10 server? You haven't mentioned that (or a lot of other information) so it is hard to know - I strongly suspect we only have half the story here which is why everyone is struggling to give you a solution.

I do not change any dns, firewall etc. settings. Also the old SME9 server is quite standard. I do not know what to tell you or what I might have left out. It does not work on the local network unless I make the admin server console hack.

I have not any settings in the Linksys router that will disallow dns traffic to the SME10. Only simple NAT forward settings to the SME9 server. It also work if I do the admin server console hack so in my view it can not be the router that is to blame.

Go back to basics. Do small steps. Check carefully and methodically and take lots of notes.

Install a clean SME v10 with some dummy settings, manual IP address, no dhcpd etc.

Make sure it all works before you do anything else. Reconfigure/reboot a few times. Do not do anything else until this all works happily.

Better check your v9 box too so we know what you are restoring.

/sbin/e-smith/audittools/newrpms
/sbin/e-smith/audittools/templates

Take down your v9 box and then restore the v10 so you do not get an IP clash.

Make sure there are no custom templates anywhere.

Reconfigure/reboot and test etc.

I have done most of these thing but is unable to take it up again until I get back on location in a couple of days. I have made a clean SME10 installation and it works fine. The problem comes after the USB disk restore. As far as I know I can only do this in the end of the installation.

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: Loosing internet connection after post-upgrade of server
« Reply #29 on: July 26, 2021, 03:33:54 PM »
I have made a clean SME10 installation and it works fine. The problem comes after the USB disk restore. As far as I know I can only do this in the end of the installation.

You can do a restore from the console after the sme10 is fully installed and operational, reconfig/reboot required after restore, beware of custom templates, ip etc will be reset as per sme9 settings
--
qui scribit bis legit