What's new

Samba over OpenVPN on different device

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

TeHashX

Very Senior Member
Need help to setup openvpn and samba, I post a question here but no response and I'm sure I will get an answer here.
I have the next scenario:
OpenVpn running on RT-AC68U v380.58 firmware with default ip 192.168.1.1
Odroid C2 with a samba share /Media ip 192.168.1.234
OpenVPN Connect installed on my android phone
This is conf file
client
dev tun
proto tcp-client
remote wan-ip-address 1194
float
cipher AES-256-CBC
comp-lzo adaptive
keepalive 15 60
ns-cert-type server
<ca>
-----BEGIN CERTIFICATE-----
xxx
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
xxx
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
xxx
-----END PRIVATE KEY-----
</key>
resolv-retry infinite
nobind
What option should I add in openvpn.ovpn or openvpn gui and smb.conf?
iptables -A INPUT...
route add -net...
Thanks
 
Last edited:
Are you already routing the whole VPN subnet? If so, then nothing more needs to be done. Just make sure the Samba server doesn't block access from your VPN subnet (typically 10.8.0.0/24). With Windows and Norton Security for instance, you have to allow the 10.8.0.0 subnet in.

Could also be a limitation of OpenVPN Connect - I don't know if it can modify the phone's routing table without having root access.
 
I disabled firewall
I added push "route 192.168.1.0 255.255.255.0" in openvpn.ovpn
I added hosts allow = 10.66.0.0/24 192.168.0.0/24 10.8.0.0/24 127.0.0.1 in smb.conf
Still can't access samba share (my phone is rooted)
 
I disabled firewall
I added push "route 192.168.1.0 255.255.255.0" in openvpn.ovpn
I added hosts allow = 10.66.0.0/24 192.168.0.0/24 10.8.0.0/24 127.0.0.1 in smb.conf
Still can't access samba share (my phone is rooted)

It's possible that the Android client doesn't allow pushed routes. Remember that on Windows, you have to run it with elevated privileges for example. So maybe root access might be needed on Android?
 
I installed another app from playstore (still can't access samba) and after disconnecting I get in log:
Sorry, deleting routes on Android is not possible. the VpnService API allows routes to be set on connect only.
So routes can be set...
 
I installed another app from playstore (still can't access samba) and after disconnecting I get in log:

So routes can be set...

Must be a limitation of the Android client then. My desktop has no problem reaching a network share over the VPN, but my phone (using ES Explorer) can't. OpenVPN Connect does show that the route to my remote LAN was properly pushed to it by the server.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top