Configure OpenVPN to permit mapping disk to local windows machine
I install the OpenVPN One-Click installation using the private IP option (not sure if that matters).
On that instance, I setup a samba share:
mkdir /mnt/idrive
apt-get install samba
apt-get install samba-client
nano /etc/samba/smb.conf
I append this to smb.conf:
[idrive]
Comment = infinity drive
Read only = no
Public = yes
Locking = no
Browseable = yes
Writeable = yes
Guest = ok
Path = /mnt/idrive
Then I add a user and set that user to own the share:
useradd allpeople -s /usr/sbin/nologin
smbpasswd -a allpeople
chown allpeople /mnt/idrive
Then I restart the samba service:
/etc/init.d/samba-ad-dc restart
In windows, I connect to the Linode VPN via openVPN client. I checked to make sure my public IP now appears as the Linode IP.
Then from SSH I successfully ping my local windows machine's local IP. I then do the same in the opposite direction and note that neither of them time out. I disconnect the VPN client and try again to confirm that they both now time-out.
After restoring the VPN connection I am unable to map \{linode internal ip}\idrive
I went through the openVPN dashboard and tried toggling almost every setting with no luck.
Can anyone with experience mapping a Linode share to their local machine help me out?
5 Replies
You write:
Then I restart the samba service:
/etc/init.d/samba-ad-dc restart
In windows, I connect to the Linode VPN via openVPN client. I checked to make sure my public IP now appears as the Linode IP.
I believe the correct way to restart samba on a linux machine is with the following:
[sudo] systemctl restart samba
YMMV depending on the distro you're using…
-- sw
You can try replace OpenVPN whit https://www.zerotier.com/
@stevewi
That command didn't work:
root@li1021-241:~# systemctl restart samba
Failed to restart samba.service: Unit samba.service not found
Samba is not being run via systemctl so the correct command is actually:
/usr/sbin/service smbd restart
And then I needed to make a samba user/password to get it to work.
Thanks!
@stevewi
That command didn't work:
root@li1021-241:~# systemctl restart samba
Failed to restart samba.service: Unit samba.service not found
Samba is not being run via systemctl so the correct command is actually:
/usr/sbin/service smbd restart
And then I needed to make a samba user/password to get it to work.
Thanks!