Allow client access to samba share on a different machine
Posted: Wed Dec 10, 2014 12:38 pm
I'm trying to follow this howto, to make LAN samba shares available to the clients connected over OpenVPN (routed, tun).
In the LAN, the OpenVPN Server and the samba file server are not on the same machine. Following the howto I have to "Include multiple machines on the server side when using a routed VPN (dev tun)", as described here.
This where i'm stuck. The description says "Next, you must 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 (this is only necessary if the OpenVPN server and the LAN gateway are different machines)." I have no idea how to do this step. The gateway in the LAN is the modem, where I barely can configure anything at all.
Is there a way to route/port portward the samba specific traffic between the machines and subnets without tampering on the LAN gateway? Or do I have some misconception of what gateway in the above linked description means?
Also Iptables,routing,etc are new to me and still confusing. I could need a little help what commands I have to execute on which machine to make the Samba shares available for the OpenVPN clients.
Illustration of the setup:

client config:
server config:
iptables:
Thanks!
In the LAN, the OpenVPN Server and the samba file server are not on the same machine. Following the howto I have to "Include multiple machines on the server side when using a routed VPN (dev tun)", as described here.
This where i'm stuck. The description says "Next, you must 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 (this is only necessary if the OpenVPN server and the LAN gateway are different machines)." I have no idea how to do this step. The gateway in the LAN is the modem, where I barely can configure anything at all.
Is there a way to route/port portward the samba specific traffic between the machines and subnets without tampering on the LAN gateway? Or do I have some misconception of what gateway in the above linked description means?
Also Iptables,routing,etc are new to me and still confusing. I could need a little help what commands I have to execute on which machine to make the Samba shares available for the OpenVPN clients.
Illustration of the setup:

client config:
Code: Select all
client
dev tun
proto udp
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ca /sdcard/cert/ca.crt
cert /sdcard/cert/my-client.crt
key /sdcard/cert/my-client.key
remote-cert-tls server
tls-auth /sdcard/cert/ta.key 1
cipher BF-CBC
comp-lzo
verb 3
Code: Select all
port 1194
proto udp
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/my-server.crt
key /etc/openvpn/my-server.key # This file should be kept secret
dh /etc/openvpn/dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /tmp/ipp.txt
push "route 192.168.207.0 255.255.255.0"
keepalive 10 120
tls-auth /etc/openvpn/ta.key 0 # This file is secret
cipher BF-CBC # Blowfish (default)
comp-lzo
user vpnuser
group vpnuser
persist-key
persist-tun
status /tmp/openvpn-status.log
verb 3
Code: Select all
help on that one would be greatly appreciated