I have setup a wireguard vpn network between three computer.
- A) My Home-PC that is running a wireguard client and wants to connect to my sambashare at my office-server C).
- B) My Home-Server that is acting as my wireguard-server / endpoint. A) and C) connect to this one.
- C) My Office-Server that has the samba-share that I want to access via wireguard.
Forwarding seems to work properly because:
- I can ping from A) to C) and from C) to A). When using the wireguard interface ip of C).
- I can also SSH from A) to C). When using the wireguard interface ip of C).
I think the problem relies in my smb.conf or how smbd.service binds to the interfaces that I specified in smb.conf because:
- I can NOT access my Samba-Share at C) when using the wireguard ip address.
- I can access my Samba-Share at C) when specifying the eth0 ip address.
This is how my smb.conf file looks like:
#### Networking #### # The specific set of interfaces / networks to bind to # This can be either the interface name or an IP address/netmask; # interface names are normally preferred ; interfaces = 127.0.0.0/8 eth0 interfaces = lo eth0 wg-buero-tunnel # Only bind to the named interfaces and/or networks; you must use the # 'interfaces' option above to use this. # It is recommended that you enable this feature if your Samba machine is # not protected by a firewall or is a firewall itself. However, this # option cannot handle dynamic or non-broadcast interfaces correctly. ; bind interfaces only = yes bind interfaces only = yes
and this is the output of netstat -tulpen | grep smbd
tcp 0 0 127.0.0.1:139 0.0.0.0:* LISTEN 0 17353 1023/smbd tcp 0 0 192.168.124.177:139 0.0.0.0:* LISTEN 0 17349 1023/smbd tcp 0 0 127.0.0.1:445 0.0.0.0:* LISTEN 0 17352 1023/smbd tcp 0 0 192.168.124.177:445 0.0.0.0:* LISTEN 0 17348 1023/smbd
The IP's here should correspond to the devices that I specified in the smb.conf but one IP/device is still missing.
lo 127.0.0.1
eth0 192.168.124.177
wg-buero-tunnel The wireguard ip is missing completely
I am really running out of ideas here.