git:// links no longer work, refer to the https:// one.
[wiki] / examples / windows-install.mdwn
1 [[!meta title="installing tinc on Windows 2000/XP/7/8"]]
2
3 ## Example: installing tinc on Windows 2000/XP/7/8
4
5 This example shows how to install and configure tinc on Windows 2000, XP, 7 or 8. It
6 is not a HOWTO, it is recommended that you read the manual as well.
7
8 [[!toc levels=2]]
9
10 ### Downloading and installing tinc
11
12 First, [[download]] the installer from the website. You don't have to save it,
13 run it from its current location.
14
15 [[!img examples/windows/download.png]]
16
17 Follow the instructions of the installer. If you already installed a TAP-Win32
18 or CIPE driver, you can uncheck the TAP-Win32 driver component.
19
20 [[!img examples/windows/components.png]]
21
22 ### Configuring tinc
23
24 Next, open the explorer and go to the directory where you installed tinc. This
25 probably is `C:\Program Files\tinc`. To start configuring tinc for your VPN,
26 create a new folder and give it the name of your VPN (if you don't have a name
27 for it, use `vpn` or make one up).
28
29 [[!img examples/windows/newfolder.png]]
30
31 In this folder you will have to create a new file named `tinc.conf`.
32
33 [[!img examples/windows/newfile.png]]
34
35 Open this file with notepad or wordpad. In this file you have to specify the
36 name of your computer on the VPN. This doesn't have to be the name you gave to
37 Windows, we assume you're calling it `home`. You can also specify to which other
38 tinc daemons you want to connect. You should also specify the network interface
39 that tinc will use. We will create that interface later, we will assume it is
40 called something like `VPN`.
41
42 [[!img examples/windows/edittincconf.png]]
43
44 In the current directory, you have to create a directory called `hosts`. In this
45 directory the host configuration files are stored. First you have to create one
46 for your own tinc daemon. The name of the file must be the same as the Name you
47 specified in the `tinc.conf` file: `home`. This file should contain a Subnet
48 variable, indicating which IP addresses your tinc daemon represents on the VPN.
49 This is probably just a single address, we will assume the subnet is
50 10.20.40.1/32.
51
52 [[!img examples/windows/edithostshome.png]]
53
54 Now you have to generate the public and private key for your tinc daemon. You
55 do this by starting command.com. Go to the directory where tinc is installed.
56 Start tinc with the `-n` option set to the name of your VPN and use the `-K`
57 option: `tincd -n vpn -K`. The keypair will be generated, and you are asked to
58 enter the names of the files to store them. Just press enter twice to use the
59 default filenames.
60
61 [[!img examples/windows/genkey.png]]
62
63 Now that the keys are generated, you should give the office a copy of your
64 `hosts\home`, and you should get a copy of `hosts\office` and store it in your
65 `hosts\ directory`. The configuration of tinc is finished.
66
67 [[!img examples/windows/files.png]]
68
69 ### Configuring the virtual network device
70
71 Next you will have to set up the virtual network device. The installer will not
72 create those for you, you have to run `addtap.bat` in tinc's installation
73 directory. This will add a new virtual network device. (If you want to run more
74 than one tinc daemon, you will need to create extra virtual network devices.)
75
76 [[!img examples/windows/addtap.png]]
77
78 After that, open the Network and Dial-up connections control panel, and change
79 the name of the new interface to the same as you specified in `tinc.conf`, in
80 our case to `VPN`.
81
82 [[!img examples/windows/rename.png]]
83
84 Then, double-click on the new interface. You can enable the icon in the taskbar
85 if you want. Click on Internet Protocol and then on Configure. Manually set the
86 address to that of your computer on the VPN, in this example 10.20.40.1. The
87 subnet mask should be set to that of the entire VPN, in this example
88 255.255.0.0.
89
90 [[!img examples/windows/configure.png]]
91
92 ### Starting tinc
93
94 Now that everything has been set up, it is time to start tinc. Start
95 command.com, go to tinc's installation directory and start tinc with the right
96 `-n` option: `tincd -n vpn`. If everything went well, it will tell you that it
97 installed itself as a service and started it.
98
99 [[!img examples/windows/start.png]]
100
101 If you enabled the taskbar icon, you will notice that it changes form:
102
103 [[!img examples/windows/iconstarted.png]]
104
105 You can temporarily stop and start tinc from the Service control panel.
106
107 [[!img examples/windows/servicemgr.png]]