Score:0

Configure network access

us flag

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

FedKad avatar
cn flag
Discussions in this question might help: https://askubuntu.com/questions/1138424/ubuntu-19-04-bonding-ethernet-and-wireless-interface
chili555 avatar
cn flag
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.
Gadgets Mall avatar
us flag
Thanks chilli555, I've edited the post. It is also 192.168.1.111 for lan (typing mistake).
Gadgets Mall avatar
us flag
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.
Score:0
us flag

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.

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.