Changes between Version 18 and Version 19 of Easy_Windows_Guide
- Timestamp:
- 08/14/19 23:22:46 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Easy_Windows_Guide
v18 v19 36 36 == Downloading and Installing OpenVPN == 37 37 38 1. Download the installer from [https://openvpn.net/index.php/open-source/downloads.html here] and run it on the server computer. Remember to adjust the Windows firewall (open the 1194 UDP port) and assign a static ip to the new created TAP interface (like 10.8.0.1).38 1. Download the installer from [https://openvpn.net/index.php/open-source/downloads.html here] and run it on the server computer. During the setup, make sure to check mark the component named "EasyRSA 2 Certificate Management Scripts". 39 39 40 40 2. Install OpenVPN on each client. (This step can be skipped for now and done at any convenient time) … … 44 44 === Preparatory Steps === 45 45 46 1. Navigate to the C:\Program Files\OpenVPN\easy-rsa folder in thecommand prompt:47 a. Press Windows Key + R48 b. Type "cmd .exe" and press Enter.49 {{{ 50 cmd.exe 51 }}} 52 c. Navigate to the correct folder:46 1. Navigate to the C:\Program Files\OpenVPN\easy-rsa folder on an elevated command prompt: 47 a. Open the start menu 48 b. Type "cmd" 49 c. Right-click on Command Prompt and choose "Run as Administrator" 50 d. Right-click the menu item "Command Prompt" 51 e. On the pop up User Account Control window, Click "Yes" 52 f. Navigate to the correct folder: 53 53 {{{ 54 54 cd "C:\Program Files\OpenVPN\easy-rsa" … … 124 124 }}} 125 125 126 5. Generate a shared-secret key (Required when using tls-auth) 127 {{{ 128 "C:\Program Files\OpenVPN\bin\openvpn.exe" --genkey --secret "C:\Program Files\OpenVPN\easy-rsa\keys\ta.key" 129 }}} 130 126 131 == Configuration Files == 127 132 128 1. Find the sample configuration files:133 The sample configuration files can be easily found using the start menu: 129 134 {{{ 130 135 Start Menu -> All Programs -> OpenVPN -> OpenVPN Sample Configuration Files … … 132 137 133 138 === Server Config File === 134 1. Open server.ovpn 135 136 2. Find the following lines: 139 1. Copy the sample server configuration file to the easy-rsa folder 140 {{{ 141 copy "C:\Program Files\OpenVPN\sample-config\server.ovpn" "C:\Program Files\OpenVPN\easy-rsa\keys\server.ovpn" 142 }}} 143 144 2. Edit server.ovpn 145 {{{ 146 notepad "C:\Program Files\OpenVPN\easy-rsa\keys\server.ovpn" 147 }}} 148 149 3. Find the following lines: 137 150 {{{ 138 151 ca ca.crt … … 141 154 }}} 142 155 {{{ 143 dh dh 1024.pem144 }}} 145 146 3. Edit them as follows:156 dh dh2048.pem 157 }}} 158 159 4. Edit them as follows: 147 160 {{{ 148 161 ca "C:\\Program Files\\OpenVPN\\config\\ca.crt" … … 151 164 }}} 152 165 {{{ 153 dh "C:\\Program Files\\OpenVPN\\config\\dh 1024.pem"154 }}} 155 156 4. Save the file as C:\Program Files\OpenVPN\easy-rsa\server.ovpn 166 dh "C:\\Program Files\\OpenVPN\\config\\dh2048.pem" 167 }}} 168 169 5. Save and close 157 170 158 171 === Client Config Files === 159 172 This is similar to the server configuration 160 173 161 1. Open client.ovpn 174 1. Copy the sample server configuration file to the easy-rsa folder with client's Common Name as the file name (each client will have a different file name) 175 {{{ 176 copy "C:\Program Files\OpenVPN\sample-config\client.ovpn" "C:\Program Files\OpenVPN\easy-rsa\keys\mike-laptop.ovpn" 177 }}} 178 179 2. Edit client's config file 180 {{{ 181 notepad "C:\Program Files\OpenVPN\easy-rsa\keys\mike-laptop.ovpn" 182 }}} 162 183 163 184 2. Find the following lines: … … 182 203 }}} 183 204 184 5. Save the file as C:\Program Files\OpenVPN\easy-rsa\mike-laptop.ovpn (in this example. Each client will need a different, but similar, config file depending upon that client's Common Name.) 205 5. Save and close 206 185 207 186 208 == Copying the Server and Client Files to Their Appropriate Directories == 187 209 188 1. Copy these files from C:\Program Files\OpenVPN\easy-rsa\ to C:\Program Files\OpenVPN\config\ on the server:210 1. Copy these files from C:\Program Files\OpenVPN\easy-rsa\keys\ to C:\Program Files\OpenVPN\config\ on the server: 189 211 {{{ 190 212 ca.crt 191 dh1024.pem 213 ta.key 214 dh2048.pem 192 215 server.crt 193 216 server.key 194 217 server.ovpn 195 218 }}} 196 197 2. Copy these files from C:\Program Files\OpenVPN\easy-rsa\ on the server to C:\Program Files\OpenVPN\config\ on each client (mike-laptop, in this example): 219 {{{ 220 robocopy "C:\Program Files\OpenVPN\easy-rsa\keys\ " "C:\Program Files\OpenVPN\config\ " ca.crt ta.key dh2048.pem server.crt server.key server.ovpn 221 }}} 222 * NOTE: The space at the end of the path in each string is important. 223 224 2. Copy these files from C:\Program Files\OpenVPN\easy-rsa\keys\ on the server to C:\Program Files\OpenVPN\config\ on each client (mike-laptop, in this example): 198 225 {{{ 199 226 ca.crt 227 ta.key 200 228 mike-laptop.crt 201 229 mike-laptop.key … … 216 244 A bug fix is anticipated ... 217 245 218 219 220 246 == Further Considerations / Troubleshooting == 221 247 222 248 === Firewall Configuration === 223 If you have connection problems, make sure to set a rule on your server's firewall allowing incoming traffic on UDP port 1194. 249 If you have connection problems, make sure to set a rule on your server's firewall allowing incoming traffic on UDP port 1194. (Win+R "wf.msc") 224 250 225 251 === Port Forwarding ===