Hello,
Client: OpenVPN GUI v2.5 on Windows 7
Server: OpenVPN 2.4 running on a Raspberry Pi at my home.
I got OpenVPN server working using this
install script from GitHub. I'm slowly understanding how to use it, what it can do and cannot.
I have several Raspberry Pis around the house and each one has Samba on it and is sharing out Samba shares. When I am at home and not connected to the VPN I can see a list of these Raspberry Pis with their hostnames (or Netbios names) listed under the "Network" list in the left column of Windows File Explorer.
When I connect to the VPN however that list of hosts disappears from the Windows File Explorer Network list. I am able to get access to those Samba shares using Map Network Drives. When I do that the share appears under the "Computer" label in File Explorer along with my C: and D: drive etc.
But is it possible to configure my VPN so when connected to it the list of other hosts on my LAN stays there under the "Network" label in the File Explorer Window so I can just keep using them?
Do I need to make a config setting in /etc/samba/smb.conf and make Netbios work over the VPN or something like that?
All the Raspberry Pis on my home LAN have ip addresses: 192.168.1.X
I have got this line in my server.conf
push "route 192.168.1.0 255.255.255.0"
There are more instructions here:
"Including multiple machines on the server side when using a routed VPN (dev tun)" however I don't know how to
"...set up a route on the server-side LAN gateway to route the VPN client subnet (10.8.0.0/24) to the OpenVPN server"
My OpenVPN is running on a Pi that is attached to my ISP Modem/Router. I suppose this is the server-side LAN gateway? It is a closed device I could not install iptables rules on. I have enabled IP forwarding on the Pi running OpenVPN but I don't know how to enable TUN/TAP forwarding?
local 192.168.1.124
port 1194
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
# This line: push "route 192.168.1.0 255.255.255.0" was added in the hopes that
# it would make Samba shares on the Home LAN appear in the Network section of
# Windows File Explorer. It did NOT do that... I can still Map to Network drive
# them which I always could anyway so you could really just delete this line!
push "route 192.168.1.0 255.255.255.0"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
crl-verify crl.pem
# Enable Logging
verb 4
status openvpn-status.log
log-append /etc/openvpn/server/openvpn.log
client
dev tun
proto tcp-client
remote mydomain.com 443
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
block-outside-dns
verb 4
#log-append openvpn-client.log
#machine-readable-output
<ca>
--STRIPPED--
</ca>
<cert>
--STRIPPED--
</cert>
<key>
-----BEGIN PRIVATE KEY-----
--STRIPPED--
-----END PRIVATE KEY-----
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
--STRIPPED--
-----END OpenVPN Static key V1-----
</tls-crypt>
Cheers,
Flex