Second Private Bridge from Linux Host to Windows Guest for Samba

1

I have a Windows VM setup through KVM on my Ubuntu host using a bridged network interface that gives the VM access to the public network and internet. I have setup a second bridge network interface that I would like to be private (local only), for a Samba share between Windows and the host.

My /etc/network/interface has the second private network setup as follows:

auto privatebr0
    iface privatebr0 inet static
        address 192.168.10.1
        netmask 255.255.255.0
        network 192.168.10.0
        broadcast 192.168.10.255
        pre-up    brctl addbr privatebr0
        post-down brctl delbr privatebr0

After adding a second network interface to the Windows VM through virt-manager using the privatebr0 interface, the second interface shows up in Windows. However the IP address does not seem right, a default IP address of 169.254.18.139 is assigned.

I can successfully setup the Samba share through the public bridge, but I do not want this on an open network, I would like to use the private bridge. Is it even possible to setup a second bridge for this purpose? Do I need to connect the bridge to lo (or is that unnecessary)?

My Samba configuration is as follows:

[WindowsShare]
#interfaces = privatebr0
path = /mnt/large_hd
available = yes
valid users = username1
read only = no
browsable = yes
public = yes
writable = yes

By commenting out the interfaces line, I can connect via the public bridge (setup as b0). Otherwise, Windows does not see the share when using privateb0. Is there any specific configurations in Windows to allow this or use the second network adapter (that is not connected to the internet)?

Please let me know if you need any additional information or if something isn't clear. Thanks for your help!

NJC

Posted 2017-05-18T20:43:20.087

Reputation: 11

1

Possible duplicate of Network devices getting an IP address in the 169.254.x.x range?

– Pimp Juice IT – 2017-06-25T03:58:42.677

I don't think this is the same problem, since it is my understanding that the private bridge shouldn't even interact with the router at all. I could be wrong though. – NJC – 2017-06-26T10:56:20.373

No answers