Windows File Sharing and Wi-Fi Hotspots

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
Andrew657
OpenVpn Newbie
Posts: 2
Joined: Tue Jan 09, 2018 9:39 am

Windows File Sharing and Wi-Fi Hotspots

Post by Andrew657 » Tue Jan 09, 2018 9:42 am

I have a mixed home network comprising Windows 10, iOS, FreeNAS, Android and Raspberry Pi (Raspbian) devices. I have installed PiVPN (pre-built OpenVPN for Raspberry Pi) and I can successfully access my network from any location. Connected devices (Windows 10 laptop, iPhone, Android) can access the Internet through the VPN so I am safe using public Wi-Fi. The iOS and Android devices can reach web pages on the home network (management GUIs etc.) and Samba (CIFS) shared directories on FreeNAS and Raspberry Pi devices. They can also reach printers successfuly. The problem is with my Windows 10 laptop.

I use a Raspberry Pi-based DNS and DHCP server, instead of relying on my ISP's router, set to use Quad9 as the upstream DNS. This runs on the same machine as PiVPN server. I'm not sure this makes any difference. The following lines have been added to /etc/openvpn/server.conf to make this work correctly

push "route 192.168.1.0 255.255.255.0"
push "dhcp-option DNS 10.8.0.1"

From a public Wi-Fi hotspot my Windows 10 machine can access the home network and reach the Internet and internal web pages. To access Samba shares I need to enable Windows File and Printer Sharing. This all works well but obviously presents a security risk as it opens my laptop to all other devices on the Wi-Fi hoptspot network. I need to maintain privacy from users on the hotspot network while conected to the home network - with access to shares and printers at home. Turning off file sharing gives me security but no access to the home network shares or printers. This only happens with the Windows 10 laptop, all other devices can access all resources.

Has anybody any ideas? I'm thinking it's an IP address range config line I may need to add to server.conf, or something similar. Maybe it's a Windows firewall change needed? I am stuck between whether it's someting I need to do on the Windows client machine or the OpenVPN server. I'm something of a newbie to OpenVPN so a bit of detail would be appreciated - more than a "It's a xxxxx problem..."

Thanks in advance.

Andrew657
OpenVpn Newbie
Posts: 2
Joined: Tue Jan 09, 2018 9:39 am

Re: Windows File Sharing and Wi-Fi Hotspots

Post by Andrew657 » Tue Jan 09, 2018 2:59 pm

Post moved to correct Forum

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Windows File Sharing and Wi-Fi Hotspots

Post by TinCanTech » Tue Jan 09, 2018 3:37 pm

Please don't post duplicate threads and yes this is the correct place for your question.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Windows File Sharing and Wi-Fi Hotspots

Post by TinCanTech » Tue Jan 09, 2018 6:07 pm

First of all,
  • NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
:arrow: Never use 192.168.0.0/24 or 192.168.1.0/24 (or other common subnets) for your OpenVPN Server LAN :!:
  • You are advised to change your server LAN to a more unique RFC1918 compliant subnet.
    For example: 192.168.1##.0/24

Post Reply