Wiki source code of VPN

Last modified by Aysegül Omus on 2024/01/08 14:57

Show last authors
1 = Setting up a VPN connection to a Chair in the CIT Departments =
2
3
4
5 {{toc/}}
6
7
8 == 1. General ==
9
10 === 1.1 Activation and configuration file ===
11
12 A VPN is available for each chair (as well as service offices etc.). However, the VPN must first be set up with the cooperation of the Chair admin or IT supervisor. If you want to get VPN access, please get in touch with your Chair admin or IT supervisor. These are ultimately also responsible for the configuration, RBG only takes over the operation and consultation.
13
14 The Access must be activated for each user by the chair admin, the configuration file will be found [[here>>https://vpn.in.tum.de]].
15
16 **Please note**: A connection to the VPN can only be established from **outside** the respective chair network (for example, the networks configured in the VPN). On the one hand, since a connection would create double routes, the VPN usually uses a UDP connection and UDP is completely blocked in most networks.
17
18 The VPN does not allow a direct connection to the Internet. Under Windows, access to the Internet should be possible via the direct network connection of the computer; under Linux, either the web proxy (proxy.in.tum.de) can be used or the routing table must be set so that the VPN is only used for routes provided by the VPN (no default route to the VPN).
19
20 === 1.2 Login and password ===
21
22 **Login**: CIT account (e.g. musterma)
23 **password**: CIT password
24
25 === 1.3 Required Software ===
26
27 On the Mac we recommend Tunnelblick:
28
29 macOS: [[Tunnelblick>>https://tunnelblick.net/]]
30
31 Otherwise, the software openvpn-client must be downloaded and installed:
32
33 Windows: [[OpenVPN for Windows>>https://openvpn.net/index.php/open-source/downloads.html]]
34
35 Ubuntu: sudo apt-get install openvpn
36
37 == 2. Windows: ==
38
39 Install the OpenVPN-Client software that can be found here:: https://openvpn.net/community-downloads/
40
41 Start the installer:
42
43 [[image:https://xwiki.rbg.tum.de/bin/download/Informatik/Helpdesk/Vpn/WebHome/OpenVPNinstallWindows.png||height="1008" width="1426"]]
44
45 Copy the OVPN-file (as described [[here>>Informatik.Helpdesk.Vpn||anchor="A_1.1._Freischaltung_und_Konfigurationsdatei"]]) to the config folder. Usually, it is to be found here: C:\Program Files\OpenVPN\config
46
47 [[image:https://xwiki.rbg.tum.de/bin/download/Informatik/Helpdesk/Vpn/WebHome/OpenVPNWindowsConfig.png||height="126" width="409"]]
48
49 Launch the VPN client via the desktop icon. (it may have already been launched, which will result in a corresponding message).
50
51 [[image:https://xwiki.rbg.tum.de/bin/download/Informatik/Helpdesk/Vpn/WebHome/OpenVPNwindowsIcon.png||height="104" width="135"]]
52
53 Right-click the OpenVPN Icon on the taskbar and choose Connect.
54
55 [[image:https://xwiki.rbg.tum.de/bin/download/Informatik/Helpdesk/Vpn/WebHome/OpenVPNWindwosConnect.png||height="287" width="402"]]
56
57 Enter your credentials (without @cit.tum.de)
58
59 [[image:https://xwiki.rbg.tum.de/bin/download/Informatik/Helpdesk/Vpn/WebHome/OpenVPNwindowsLogin.png||height="286" width="407"]]
60
61
62 Your connection should be established now, as indicated by a green OpenVPN icon in the taskbar.
63
64 [[image:Screenshot 2020-03-20 at 13.48.37.png||height="86" width="84"]]
65
66 == 3. macOS: ==
67
68 If you have not installed Tunnelblick, you can download it [[here>>https://tunnelblick.net/]] and install it.
69
70 **Note**: Access must be activated for each user by the chair administrator, the configuration file is available from https://vpn.in.tum.de.
71
72
73 Open the page https://vpn.in.tum.de and search for your chair in the list.
74
75 [[image:openvpnstandard.png||height="143" width="376"]]
76
77
78
79 Right-click on the configuration file (standard, legacy, ios) and select **Save the file as ...** off.
80
81 [[image:vpndownloadovpn.png||height="141" width="374"]]
82
83 \\
84
85 Select the location of the file.
86
87 [[image:openvpnsave.png||height="173" width="372"]]
88
89
90
91 The file was saved as a .txt file. Delete the ending .txt.
92
93 [[image:openvpnrename.png||height="213" width="369"]]
94
95
96
97
98 Open the configuration file with a double click or with the right mouse button as below.
99
100 [[image:openvpnopenwith.png||height="142" width="371"]]
101
102
103
104 You can choose whether the configuration file should be installed for all users of the laptop or only for the current user, i.e. for you.
105
106 [[image:openvpnonlyme.png||height="142" width="375"]]
107
108
109
110
111 Enter the system password to confirm the installation.
112
113 [[image:openvpninstallconfiguration.png||height="243" width="368"]]
114
115
116
117
118 When the configuration file has been installed, the following window appears in the upper right corner:
119
120 [[image:openvpnsuccessfullyinstalled.png||height="70" width="376"]]
121
122
123
124
125 You will see a tunnel symbol when the program has started. Next, you can click it and select **Connect vpn-xxx-standard** to connect to the VPN.
126
127 [[image:connectopenvpn.png||height="248" width="378"]]
128
129 \\
130
131 Finally, enter the CIT ID (without @cit.tum.de) and the CIT password in the opened window and click on **OK**.
132
133 [[image:openvpnlogin.png||height="244" width="379"]]
134
135
136
137
138 When the connection is established the Tunnelblick symbol is white as can be seen in the screenshot below.
139
140 [[image:Screenshot 2020-03-20 at 13.53.25.png||height="142" width="164"]]
141
142
143
144 == 4. Linux: ==
145
146 Save the configuration file, e.g. to the Home folder.
147 In the terminal, go to this directory and execute this command: sudo openvpn Configuration file, e.g. for group XXX:
148 {{{sudo openvpn vpnxxx.ovpn }}}
149 Then enter the CIT ID (without @cit.tum.de) and the CIT password.
150
151 === 4.1 Import VPN profile into network manager ===
152
153 The RBG VPN profile can be imported either via the Gui or via the command line.
154
155 ==== 4.1.1 Via the GUI tool nm-connection-editor: ====
156
157 Right-click on the nm applet and click on **Edit connections**: Then choose **Add** and then **Import a saved one VPN configuration**.
158
159 ==== 4.1.2 Via the terminal: ====
160
161 Enter the following command in the terminal: nmcli connection import type openvpn file / vpn-rbg-standard.ovpn
162
163 === 4.2 Possible Problems ===
164
165 It is possible, that openvpn has problems with Ubuntu.
166 The problem is that in the network manager from the openvpn plugin in the settings page, this thing has to be activated: {{html wiki="true"}}<strong>''Use this connection only for resources on its network''</strong>{{/html}}. When activated there is no possible {{html wiki="true"}}<strong>defaultgateway</strong>{{/html}}. Although the RBG VPN has no default gateway, thinks the network manager, that there is one and so is the problem lost
167
168
169 [[image:vpnipv4.jpg.png||width="900"]]
170
171 The same has to be done for the IPv6 Settings.
172
173 [[image:vpnipv6.png||width="900"]]
174
175 == 5. Special cases ==
176
177 === 5.1 Multiple VPNs ===
178
179 {{html wiki="true"}}<span style='background-color: transparent; color: #000000; font-size: small;' >In Windows with multiple simultaneous</span>{{/html}} OpenVPN {{html wiki="true"}}<span style='background-color: transparent; color: #000000; font-size: small;' > a connections another TAP device must be added.</span>{{/html}}
180
181 Windows 7:
182
183 * {{html wiki="true"}}<span style='background-color: transparent;' > add **hdwwiz.exe** (Add Hardware Wizard) to be able to add a new hardware component.</span>{{/html}}
184 * {{html wiki="true"}}<span style='background-color: transparent;' >Manually select the hardware from the list (advanced setting), leave the settings at **Show all components**, click on **Installation media available**</span>{{/html}}
185 * {{html wiki="true"}}<span style='background-color: transparent;' >The path for the driver is:</span>{{/html}}{{html wiki="true"}}<span style='background-color: transparent;' >C:\Program Files\TAP-Windows\driver</span>{{/html}}
186 * {{html wiki="true"}}<span style='background-color: transparent;' >TAP-Windows Select Adapter V9</span>{{/html}}
187 all Windows versions:
188
189 Run the following in an administrator shell: | C:\Program Files\TAP-Windows\bin\tapinstall install C:\Program Files\TAP-Windows\driver\OemVista.inf tap0901 |.