0

I am trying to configure my Ubuntu (20.04) server on an old laptop, and there is something I do not understand about the configuration. From the ISP router's settings, I can see that it allocated the wifi IP 192.168.1.66 to the server, and lan IP 192.168.1.111 - I've also set the router to always give this IPs to the server and forward HTTP/S to 192.168.1.111. But being new to server-ing, I have to ask: shouldn't there be only one IP for the server?

Further more, and this is my big issue, in the Ubuntu's Network settings I cannot see the lan IP (see photo). The hosted site loads fine in the browser, and I'm also also using a software called NoMachine I connect remotely to the Ubuntu's desktop to the same lan IP 192.168.1.111, so I'm assuming everything works fine.

I just want to make sure that the server is using the lan cable to serve the site's visitors, and not connect to wifi. This is the /etc/netplan/00-installer-config.yaml

# This is the network config written by 'subiquity'
network:
  ethernets:
    enp2s0:
      dhcp4: true
  version: 2

network photo

Update: I've just discovered the network manager command (slowly learning linux) and added an eth connection (all automatic, for compatibility). But when I try to connect to it, it still writes that the connection was never used. Nmcli con show -a displays only the wifi connection. /etc/netplan/00-installer-config.yaml is the same.

Eth connection not in use photo

4
  • Discussions in this question might help: askubuntu.com/questions/1138424/…
    – FedKad
    Jun 18 '21 at 19:02
  • It is correct in all cases that if wifi and ethernet are both connected they will have different IP addresses. You say: "and forward HTTP/S to 192.168.1.111. " Why? That is the wifi address and you clearly say: "I just want to make sure that the server is using the lan cable to serve the site's visitors, and not connect to wifi." By default, networking in server edition is controlled in netplan. Please edit your question to show the result of the terminal command: cat /etc/netplan/*.yaml Welcome to Ask Ubuntu.
    – chili555
    Jun 18 '21 at 20:40
  • Thanks chilli555, I've edited the post. It is also 192.168.1.111 for lan (typing mistake). Jun 19 '21 at 7:17
  • FedonKadifeli, I don't think it's the same context. What I am basically searching for, and want to make sure of, is that the server serves the site through the lan cable. Not having the network display in the manager makes me wonder. Jun 19 '21 at 7:19
0

OK, I've managed to find the solution myself. Hopefully it will help others. It seems that there was a bug (from what others talked about) in the previous versions of Ubuntu, and it is possible that this bug remained in 20.04. So this is my solution (in terminal):

sudo nano /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf

Add ,except:type:ethernet to the end of the line so it looks like this:

unmanaged-devices=*,except:type:wifi,except:type:wwan,except:type:ethernet

Restart NetworkManager or reboot the server:

sudo systemctl restart NetworkManager

And everything seem to be fine now, the eth connection is active. Wired Connected

PS I've also set the priority for the wired to a positive number and for the wifi to a negative number just to make sure the wired is preferred instead of the wifi.

Other also suggested to write only unmanaged-devices=none in this file. I haven't tried it, maybe it will work as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.