

























After fiddling around with Network Manager's configuration, I've determined to be in need of guidance to solve the mess I've put myself into. If anyone thinks they can help, I would greatly appreciate.
My intention, if I understand what I'm even trying to do, is to setup my VM under a bridged network so that it doesn't use the VPN I have running in my Linux host.
Now, I think I managed to get the network going, but since the VM kept using my VPN connection I assumed that this wasn't the case...
At first, I've tried the following commands:
$ nmcli con add type bridge ifname br0 stp no
$ nmcli con add type bridge-slave ifname enp14s0 master br0
$ nmcli connection down Wired\ Connection\ 2
$ nmcli connection up bridge-br0
$ nmcli connection up bridge-slave-enp14s0which resulted in the following ("batless" is an alias for "bat --pager=less"):
$ nmcli connection show | batless
─────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ STDIN
─────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ NAME UUID TYPE DEVICE
2 │ bridge-slave-enp14s0 248eb93c-5278-44b4-a03a-74ab1f96300f ethernet enp14s0
3 │ bridge-br0 d4df0532-ebdf-43e1-a4e0-51d735a2f702 bridge br0
4 │ lo 7540fc88-032d-4685-b973-1799636bbec5 loopback lo
5 | virbr0 (I don't remember what UUID was here) bridge ???
6 │ Wired connection 1 9dc605f1-25d0-3b68-8c1f-1fe1bb2ac5cc ethernet --
7 │ Wired connection 2 b0423d7d-46b1-31dd-af67-f82e4b8a9c5c ethernet --
─────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────Following the instructions of https://wiki.archlinux.org/title/Networ … orkManager:
$ nmcli connection modify Wired\ Connection\ 2 connection.autoconnect noAt this point, I wanted to add DHCP:
$ nmcli con mod bridge-slave-enp14s0 ipv4.method auto
$ nmcli con up bridge-slave-enp14s0This is where my confusion started.
For some reason, while I was getting normal ethernet connection, the VPN would no longer connect, so I went in circles connecting and disconnecting while checking to see if anything changed with the "batless" command earlier. Eventually, I found a solution in the troubleshooting section of the Arch manual's article by running the following commands in sequence:
1. $ nmcli connection up Wired\ connection\ 2
2. activate my VPN
3. $ nmcli connection up bridge-slave-enp14s0
This would be required every time I wanted to connect with my VPN on the bridge slave.
I then created an xml file:
$ batless ~/My_VMs/bridge-network.xml
─────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: /home/nocia/My_VMs/bridge-network.xml
─────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ <network>
2 │ <name>br0net</name>
3 │ <forward mode='bridge'/>
4 │ <bridge name='br0'/>
5 │ </network>
─────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── $ virsh net-define bridge-network.xml
$ virsh net-start br0net
$ virsh net-autostart br0netIn Virt-Manager, a new bridge network would show up as "(inactive)" in the NIC Network source, so I relaunched Virt-Manager which updated it to no longer be listed as inactive. I switched from "Virtual network 'default' : NAT" (which I had setup with "firewall_backend = "iptables"" in "/etc/libvirt/network.conf") to the new "Virtual network 'br0net' : BRIDGE network". I launched the VM, but upon checking the IP address in browserleak.com, it was still the same as the one in my Linux host, so I thought the bridge wasn't working as I intended. I powered down the VM...and from what I recall, this is where it all went south.
I thought the default "virbr0" bridge that showed up with
was preventing the VM from properly connecting to the new "bridge-br0"ーat that point, I had two virtual networks up and running:
$ virsh net-list
Name State Autostart Persistent
-------------------------------------------
br0net active yes yes
default active yes yesSo I ran the following:
$ nmcli connection down virbr0After that, the network "virbr0" was replaced by "vnet5" in Glances; "enp14s0" was also replaced by "br0".
I relaunch the VM...
This time, there was no ethernet connection at all in the VM.
I closed the VM again. When I checked "$ ip addr", "virbr0" had disappeared. It would no longer show up with either "$ ip addr" or "$ nmcli connection show | batless". Only "vnet5" was up and running and it had no inet IPv4 address.
I relaunched the VM. Again, no ethernet connection in the VM.
At some point, I manage to get "virbr0" back up with:
$ sudo ip link set virbr0 uponly it had no IP addressーon the other hand, "vnet5", which had appeared the first time I launched the VM after autostarting the "br0net" BRIDGE network, only had an IPv6 in the output of "$ ip addr", its status was "UNKNOWN" and its master was "virbr0".
I kept going in circles again to try to make sense of what was going on until I eventually ran:
$ virsh net-autostart br0net --disableand rebooted the PC.
Once I got back into my display compositor, I changed the Virt-Manager NIC back to the default NAT, ran the same sequence of two commands and activating my VPN between both as I mentioned earlier to get a connection running again and relaunched the VM once more...
Now I'm back at square one...with my journal indicating that ntpd is unable to remove some kind of self-restriction for fe80::fb50:ec50:8b88:4e84%10:
$ journalctl -p 3 -xb
Jun 18 05:02:26 archlinux kernel: amdgpu: Overdrive is enabled, please disable it before reporting any bugs unrelated to overdrive.
Jun 18 05:02:29 Markury kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -16
Jun 18 05:02:49 Markury kernel: xhci_hcd 0000:7a:00.0: PM: suspend_common(): xhci_pci_suspend returns -110
Jun 18 05:02:49 Markury kernel: xhci_hcd 0000:7a:00.0: can't suspend (hcd_pci_runtime_suspend returned -110)
Jun 18 05:03:14 Markury polkit-agent-helper-1[1382]: pam_unix(polkit-1:auth): conversation failed
Jun 18 05:03:14 Markury polkit-agent-helper-1[1382]: pam_unix(polkit-1:auth): auth could not identify password for [nocia]
Jun 18 05:05:38 Markury ntpd[1075]: unable to remove self-restriction for fe80::fb50:ec50:8b88:4e84%10
Jun 18 05:07:33 Markury polkit-agent-helper-1[12233]: pam_unix(polkit-1:auth): conversation failed
Jun 18 05:07:33 Markury polkit-agent-helper-1[12233]: pam_unix(polkit-1:auth): auth could not identify password for [nocia]
Jun 18 05:07:33 Markury polkit-agent-helper-1[12247]: pam_unix(polkit-1:auth): conversation failed
Jun 18 05:07:33 Markury polkit-agent-helper-1[12247]: pam_unix(polkit-1:auth): auth could not identify password for [nocia]
Jun 18 05:07:33 Markury polkit-agent-helper-1[12247]: pam_faillock(polkit-1:auth): Error sending audit message: Address family not supported by protocol
Jun 18 05:07:33 Markury polkit-agent-helper-1[12247]: pam_faillock(polkit-1:auth): Error sending audit message: Address family not supported by protocol
Jun 18 05:15:05 Markury ntpd[1075]: unable to remove self-restriction for fe80::fb50:ec50:8b88:4e84%14
Jun 18 05:22:16 Markury ntpd[1075]: unable to remove self-restriction for fe80::fb50:ec50:8b88:4e84%17
Jun 18 05:29:19 Markury ntpd[1075]: unable to remove self-restriction for fe80::fb50:ec50:8b88:4e84%24
Jun 18 05:38:05 Markury ntpd[1075]: unable to remove self-restriction for fe80::fb50:ec50:8b88:4e84%28
Jun 18 05:43:54 Markury ntpd[1075]: unable to remove self-restriction for fe80::fb50:ec50:8b88:4e84%34As you can see, after shutting down the VM again, I've made it so that only "br0net" gets autostarted on boot, rebooted the PC, then tried to repeat steps 1, 2 and 3, but now every time I want to reconnect while using the "bridge-slave-enp14s0", it just stops trying to connect. Now, I'm stuck between this:
$ nmcli connection show | batless
─────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ STDIN
─────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ NAME UUID TYPE DEVICE
2 │ bridge-slave-enp14s0 248eb93c-5278-44b4-a03a-74ab1f96300f ethernet enp14s0
3 │ bridge-br0 d4df0532-ebdf-43e1-a4e0-51d735a2f702 bridge br0
4 │ lo 7540fc88-032d-4685-b973-1799636bbec5 loopback lo
5 │ Wired connection 1 9dc605f1-25d0-3b68-8c1f-1fe1bb2ac5cc ethernet --
6 │ Wired connection 2 b0423d7d-46b1-31dd-af67-f82e4b8a9c5c ethernet --
─────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────and this:
$ nmcli connection show | batless
─────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ STDIN
─────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ NAME UUID TYPE DEVICE
2 │ lo 7540fc88-032d-4685-b973-1799636bbec5 loopback lo
3 │ bridge-br0 d4df0532-ebdf-43e1-a4e0-51d735a2f702 bridge --
4 │ bridge-slave-enp14s0 248eb93c-5278-44b4-a03a-74ab1f96300f ethernet --
5 │ Wired connection 1 9dc605f1-25d0-3b68-8c1f-1fe1bb2ac5cc ethernet --
6 │ Wired connection 2 b0423d7d-46b1-31dd-af67-f82e4b8a9c5c ethernet --
─────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────As of right now, I can only have a working ethernet on "Wireless Connection 2", which updates its device to "enp14s0" every time I turn its status back UP.
So now, I have three questions:
1. How do I get the VM to connect directly to my router without using my host's connection?
2. How do I solve ntpd's self-restriction?
3. Is there a way to make it so that I don't have to go through steps 1, 2 and 3 to get my VPN to work with this configuration?
Last edited by CryogEnix (Today 11:50:04)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。