SMB Over Openvpn

Status
Not open for further replies.

Simnico99

Cadet
Joined
Dec 17, 2016
Messages
8
I don't know how to connect someone when the openvpn is in the same machine as the SMB can you help me?
 
Joined
Jan 7, 2015
Messages
1,150
The easiest way I ever found to do this reliably, is to configure OpenVPN to distribute similar IPs to the clients. For instance, if your home network range is 192.168.0.1, then configure the OpenVPN server to distribute IPs in the 192.168.1.1 range. Ive only done it this way because I have a rather large home network and lots of devices pulling IPs, I dont see why you couldnt dedicate OpenVPN to give IPs in your subnet though, say above .245 or something. Then once a client is connected they should be able to go to smb://192.168.X.X/share or use //192.168.X.X/share from a Windows box. The shares *should be visible. Then its a matter of allowing guests to the share via the permissions of the dataset/share..
 

Simnico99

Cadet
Joined
Dec 17, 2016
Messages
8
It doesn't detect it the config is :
port 1194
proto udp
dev tun
ca /mnt/keys/ca.crt
cert /mnt/keys/openvpn-server.crt #Server public key
key /mnt/keys/openvpn-server.key #Server private key
dh /mnt/keys/dh.pem #Diffie-Hellman parameters
server 172.16.8.0 255.255.255.0 #Purple network
ifconfig-pool-persist ipp.txt
push "route 192.168.2.1 255.255.255.0" #Yellow network
tls-auth /mnt/keys/ta.key 0
#crl-verify crl.pem
keepalive 10 120
cipher AES-256-CBC
auth SHA256
group nobody
user nobody
comp-lzo
persist-key
persist-tun
verb 3

(Trying to ping the FreeNas on my own computer works and from OpenVpn doesnt works)
also in my home network all Local ip starts with 192.168.2.XX
 
Last edited:
Joined
Jan 7, 2015
Messages
1,150
I say you try changing the purple network to 192.168.3.0. I used to run in to these issues and if you fiddle enough you can get it to work, but its much easier to just have an ip in the same range. If you have any ipfw.rules set, you also need to change any reference to the 172.16.8.0 in those to the new range as well.

Also shouldnt the push address be 192.168.2.0 255.255.255.0? I believe thats how mine is set and it works. Has worked very reliable for a long time.
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
Don't know if this is an issue for you, but NetBIOS is a broadcast protocol. It won't leave your freenas server's subnet. If you're trying to access SMB from another subnet, you should use IP address (rather than clicking on 'network' in windows).
 
Status
Not open for further replies.
Top