Blame

db74f7 Samuli Seppänen 2025-02-11 11:37:58 1
# How can I connect Windows XP to a Linux-based Samba server using routing rather than bridging?
2
3
* internal net: 192.168.1.0/24
4
* samba server: 192.168.1.5
5
* gateway 192.168.1.1
6
* windows xp: dialup networking
7
8
server config on linux gateway:
9
10
```
11
dev tun0
12
ifconfig 192.168.5.6 192.168.5.5 <-- openvpn-net
13
port 12345
14
verb 1
15
local 123.123.123.12 <-- official server ip address
16
user nobody
17
group nogroup
18
secret /etc/openvpn/key
19
tun-mtu 1500
20
daemon
21
```
22
23
open port 12345 on the firewall on server (gateway)
24
25
on windows xp:
26
27
1. Go to windows network panel.
28
1. Set the windows tap-device from application control to always connected.
29
1. Set the ip address to 192.168.5.5 netmask 255.255.255.252.
30
1. Leave DNS and gateway empty.
31
32
openvpn config on Windows XP:
33
34
```
35
dev tun0
36
ifconfig 192.168.5.5 192.168.5.6 <-- openvpn-net
37
port 12345
38
ip-win32 manual
39
verb 1
40
remote 123.123.123.12 <-- official server ip address
41
secret C:\programme\openvpn\config\key
42
tun-mtu 1500
43
ping 30
44
```
45
46
create a batch file:
47
48
```
49
route add 192.168.1.0 mask 255.255.255.0 192.168.5.6
50
ping 192.168.1.5
51
net use g: \\192.168.1.5\Daten /USER:user1 <-- your account on samba!!
52
```
53
54
After connecting to the internet, start the batch file
55
and enter the password for samba.
56
57
Viola, now you have the service Daten on drive g:.
58
59
Now you can set the service openvpn to start automatically
60
and only start the batch file
61
after internet connection.
62
63
Richard Lechner