Score:0

ssh, samba, microserv and apache not working after IP change

ru flag

I installed Ubuntu 20.04.1 LTS and under DHCP address 192.168.0.10 installed OpenSSH, LAMP, Samba, Webmin. I changed netplan to manual IP 192.168.0.10, and everything worked fine, but when I changed the IP to 192.168.0.9 there is no response from any server (ssh, LAMP, Samba...). If I change back the IP everything works again.

UFW status is inactive. Any idea why the server is not accessable?

Emoji avatar
ng flag
Which device, server or client, does the IP (`192.168.0.9` or `192.168.0.10`) belongs to?
ru flag
The address of the server is 192.168.0.10 but if i change it to 192.168.0.9 than nothing is accessible any more
Soren A avatar
mx flag
Don't ever set a static ip-address that is included in a dhcp-range. You risk that it is given to / in use by another device.
ru flag
Thank you Soren, after so many years in IT I did not checked the dhcp range and sinned against dhcp server, entered to his territory and been sentenced to chase shadows of lost ports thru hall night.
Score:0
ru flag

I made a big mistake, I did not check if IP .9 is free, so I poked into an already used IP. That was causing the problem.... So people, if you can not access your ports, take a look for IP conflicts.

Score:0
ng flag

In a nutshell: change IPs in your config files from .10 to .9.

Step-by-step tutorial (do this in any config files originally using .10):

  1. Run nano <filename> (or sudo nano <filename> if it needs root permissions to edit)
  2. Find 192.168.0.10 and replace them with 192.168.0.9.
  3. Restart the related services
ru flag
Madmin@ubunas:/$ sudo grep -r 192.168.0.10 * etc/netplan/01-netcfg.yaml: addresses: ['192.168.0.10/24'] The IP is only in netplan config
ru flag
netstat -tulpn | grep LISTEN tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 699/smbd tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 699/smbd tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 756/perl tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1012/sshd: /usr/sbi
ru flag
server is listening on all IP-s but not "hearing"
ru flag
I can ping it from other computer (on interface 192.168.0.9) but the ports are not responding...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.