How can I connect Windows XP to a Linux-based Samba server using routing rather than bridging?

internal net:
samba server:
windows xp: dialup networking

server config on linux gateway:

dev tun0
ifconfig <-- openvpn-net
port 12345
verb 1
local <-- official server ip adress
user nobody
group nogroup
secret /etc/openvpn/key
tun-mtu 1500

open port 12345 on the firewall on server (gateway)

on windows xp:

Go to windows network panel.
Set the windows tap-device from application control to always connected.
Set the ipadress to netmask
Leave DNS and gateway empty.

openvpn config on Windows XP:

dev tun0
ifconfig <-- openvpn-net
port 12345
ip-win32 manual
verb 1
remote <-- official serveripadress
secret C:\programme\openvpn\config\key
tun-mtu 1500
ping 30

create a batchfile:

route add mask
net use g: \\\Daten /USER:user1 <-- your account on samba!!

After connecting to the internet, start the batch file
and enter the password for samba.

Viola, now you have the service Daten on drive g:.

Now you can set the service openvpn to start automatically
and only start the batch file
after internet connection.

Richard Lechner

Return to FAQ

Last modified 10 years ago Last modified on 01/30/14 16:16:18