네트워킹

오늘:
1,108
어제:
2,375
전체:
2,786,844

고객센타 : 070-7752-2000
팩스 : 070-7752-2001
휴대폰 : 010-9513-0019
email : voipkorea@yahoo.co.kr

국민은행
(주)제이에스솔루션
047101-04-155519

Flag Counter
■ 무료 : 유선 집전화 휴대폰 ( 한국 미국 중국 카나다) ↔ (국내 해외 여행자 상사 주재원 유학생) / 가입무 무제한무료■

https://community.openvpn.net/openvpn/wiki/Easy_Windows_Guide#DownloadingandInstallingOpenVPN


This page contains a no-frills guide to getting OpenVPN up and running on a Windows server and client(s). For a more detailed understanding of setting up OpenVPN and its advanced features, see the HOWTO page.

Table of contents

  1. Downloading and Installing OpenVPN
  1. Certificates and Keys

2.1 Preparatory Steps

2.2 Building Certificates and Keys

  1. Configuration Files

3.1 Server Config File

3.2 Client Config Files

  1. Copying the Server and Client Files to Their Appropriate Directories
  1. Starting OpenVPN
  1. Further Considerations / Troubleshooting

6.1 Firewall Configuration

6.2 Port Forwarding

6.3 Static Internet IP

6.4 Running OpenVPN as a Service

6.5 Security Tips

Downloading and Installing OpenVPN

  1. Download the installer from here and run it on the server computer.
  1. Install OpenVPN on each client. (This step can be skipped for now and done at any convenient time)

Certificates and Keys

Preparatory Steps

  1. Navigate to the C:\Program Files\OpenVPN\easy-rsa folder in the command prompt:
    1. Press Windows Key + R
    2. Type "cmd.exe" and press Enter.
      cmd.exe
      
    3. Navigate to the correct folder:
      cd "C:\Program Files\OpenVPN\easy-rsa"
      
  1. Initialize the OpenVPN configuration:
    init-config
    
    • NOTE: Only run init-config once, during installation.
  1. Open the vars.bat file in a text editor:
    notepad vars.bat
    
  1. Edit the following lines in vars.bat, replacing "US", "CA," etc. with your company's information:
    set KEY_COUNTRY=US
    set KEY_PROVINCE=CA
    set KEY_CITY=SanFrancisco
    set KEY_ORG=OpenVPN
    set KEY_EMAIL=mail@host.domain
    
  1. Save the file and exit notepad.
  1. Run the following commands:
    vars
    
    clean-all
    

Building Certificates and Keys

  1. The certificate authority (CA) certificate and key:
    build-ca
    
    • When prompted, enter your country, etc. These will have default values, which appear in brackets. For your "Common Name," a good choice is to pick a name to identify your company's Certificate Authority. For example, "OpenVPN-CA":
      Country Name (2 letter code) [US]:
      State or Province Name (full name) [CA]:
      Locality Name (eg, city) [SanFrancisco]:
      Organization Name (eg, company) [OpenVPN]:
      Organizational Unit Name (eg, section) []:
      Common Name (eg, your name or your server's hostname) []:OpenVPN-CA
      Email Address [mail@host.domain]:
      
  1. The server certificate and key:
    build-key-server server
    
    • When prompted, enter the "Common Name" as "server"
    • When prompted to sign the certificate, enter "y"
    • When prompted to commit, enter "y"
  1. Client certificates and keys:
  1. For each client, choose a name to identify that computer, such as "mike-laptop" in this example.
    build-key mike-laptop
    
    • When prompted, enter the "Common Name" as the name you have chosen (e.g. "mike-laptop")
  2. Repeat this step for each client computer that will connect to the VPN.
  1. Generate Diffie Hellman parameters (This is necessary to set up the encryption)
    build-dh
    

Configuration Files

  1. Find the sample configuration files:
    Start Menu -> All Programs -> OpenVPN -> OpenVPN Sample Configuration Files
    

Server Config File

  1. Open server.ovpn
  1. Find the following lines:
    ca ca.crt
    cert server.crt
    key server.key
    
    dh dh1024.pem
    
  1. Edit them as follows:
    ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
    cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
    key "C:\\Program Files\\OpenVPN\\config\\server.key"
    
    dh "C:\\Program Files\\OpenVPN\\config\\dh1024.pem"
    
  1. Save the file as C:\Program Files\OpenVPN\easy-rsa\server.ovpn

Client Config Files

This is similar to the server configuration

  1. Open client.ovpn
  1. Find the following lines:
    ca ca.crt
    cert client.crt
    key client.key
    
  1. Edit them as follows:
    ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
    cert "C:\\Program Files\\OpenVPN\\config\\mike-laptop.crt"
    key "C:\\Program Files\\OpenVPN\\config\\mike-laptop.key"
    
    • Notice that the name of the client certificate and key files depends upon the Common Name of each client.
  1. Edit the following line, replacing "my-server-1" with your server's public Internet IP Address or Domain Name. If you need help, see Static Internet IP below.
    remote my-server-1 1194
    
  1. 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.)

Copying the Server and Client Files to Their Appropriate Directories

  1. Copy these files from C:\Program Files\OpenVPN\easy-rsa\ to C:\Program Files\OpenVPN\config\ on the server:
    ca.crt
    dh1024.pem
    server.crt
    server.key
    server.ovpn
    
  1. 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):
    ca.crt
    mike-laptop.crt
    mike-laptop.key
    mike-laptop.ovpn
    

Starting OpenVPN

  1. On both client and server, run OpenVPN from:
    Start Menu -> All Programs -> OpenVPN -> OpenVPN GUI
    
  1. Double click the icon which shows up in the system tray to initiate the connection. The resulting dialog should close upon a successful start.

Further Considerations / Troubleshooting

Firewall Configuration

If you have connection problems, make sure to set a rule on your server's firewall allowing incoming traffic on UDP port 1194.

Port Forwarding

If your server is behind a router, you will need to forward the port chosen for OpenVPN (in this example UDP 1194) to the server. Consult your router's documentation for details on this.

To set up port forwarding, you will likely need to set up the server with a static local IP address instead of the default dynamic (changing) IP. Instructions for Windows XP may be found here. Make sure to choose a static IP address that is not in the range your router might assign as a dynamic IP, but is within the router's subnet (usually 192.168.0.xxx , 10.0.0.xxx , or similar).

Static Internet IP

Your server will need to have a static internet IP or Domain Name to be accessible over the long term. One solution is to sign up for an account with DynDNS and install the DynDNS Updater on your server. When signing up you will determine the static Domain Name of your server. (For example, "myserver.dyndns.org") You will use this Domain Name in the client configuration files as part of the "remote" directive.

Running OpenVPN as a Service

Running OpenVPN as a service will allow:

  1. OpenVPN to be run from a non-administrator account.
  1. OpenVPN to be started automatically on system startup. This is often preferred on the server machine, as well as any machines which will be constantly connected to the server.
  1. Run the Windows Service administrative tool:
    1. Press Windows Key + R
    2. Type "services.msc" and press Enter.
      services.msc
      
  1. Find the OpenVPN service, and set its Startup Type to "automatic."
  1. Optionally, start the service now.

Security Tips

  1. Transmit all needed files to the client computers using a secure means such as a USB drive (email is not always a secure means).
  2. Choose a port other than UDP 1194, and replace the port number wherever this guide mentions UDP port 1194.

Cloning OpenVPN Servers

If including OpenVPN in a cloned server build you will find that all servers will have the same MAC address for the TAP device. This will cause packet loss across the network. Standard methods of changing the IP address from scripts do not work on the TAP device, to resolve this delete and recreate the TAP device using the scripts included with OpenVPN:

C:\Program Files\OpenVPN\bin\deltapall
C:\Program Files\OpenVPN\bin\addtap

You will then have to rename the connection to match the entry in the config file.

조회 수 :
424
등록일 :
2017.09.20
11:31:17 (*.160.88.18)
엮인글 :
http://webs.co.kr/index.php?document_srl=3311939&act=trackback&key=4de
게시글 주소 :
http://webs.co.kr/index.php?document_srl=3311939
List of Articles
번호 제목 글쓴이 날짜 조회 수
97 How To Install Java with Apt-Get on Ubuntu 16.04 oracle java admin 2017-10-13 38
96 우분투 Linux(Ubuntu)에 Java설치 및 환경 설정하는 방법 admin 2017-10-13 43
95 우분투 다운로드 사이트 주소 ubuntu download 16.04.3 17.04 site link admin 2017-10-13 50
94 How to install Java on linux with no Internet connectivity (using local repository) admin 2017-10-01 327
93 윈도우 ssh 접속 프로그램 admin 2017-09-29 328
» openvpn Easy Windows Guide admin 2017-09-20 424
91 OpenVPN - Getting started How-To admin 2017-09-20 430
90 openssl 을 이용한 인증서 생성 절차를 정리한다. 개인키 CSR SSL 인증서 파일 생성 admin 2017-09-14 465
89 How to Manually Unblock / Unban IP Address in fail2ban 차단풀기 admin 2017-09-12 459
88 How To Protect SSH with fail2ban on Debian 7 데비안 ssh 방어 무작위 로그인 admin 2017-09-12 480
87 SSH 무작위 로그인 시도 막기(With Fail2Ban on CentOS 6/7 + selinux) admin 2017-09-12 474
86 리눅스 데비안 네트워크 설정 유선랜 무선랜 linux debian network setting 설정 admin 2017-09-07 529
85 linux debian 계열 network 설정 테트워크 데비안 admin 2017-09-07 510
84 PUTTY DOWNLOAD - FREE SSH & TELNET CLIENT admin 2017-09-03 644
83 debian 8.8 download cd1 cd2 cd3 etc admin 2017-09-03 543
82 Debian Download 데비안 리눅스 다운로드 admin 2017-09-02 792
81 데비안 리눅스 부팅시에 방화벽 서버에 자동실행 되게 설정 해보자 admin 2017-08-30 555
80 리눅스 시작시에 부팅시 프로세스 프로그램 자동 실행 설정 admin 2017-08-30 574
79 리눅스 시작시 부팅 시, 프로그램 자동실행 등록하기 admin 2017-08-30 598
78 리눅스 부팅시 시작시 프로그램 명령어 실행하기 (Linux Init script) admin 2017-08-30 559
77 리눅스 부팅시 자동 실행 명령스크립트 실행하기 만들기 이해 linux booting admin 2017-08-30 579
76 부팅시 자동실행 명령어 스크립트, rc.local admin 2017-08-30 564
75 the world’s most widely deployed RADIUS server document admin 2017-08-29 571
74 네트워크 디바이스명 변경 리눅스 eth0 eth1 admin 2017-08-29 591
73 Cloned VMware CentOS6 Server "device eth0 does not seem to be present, admin 2017-08-29 573
72 VMWARE VM Error boot loader install grub - install /dev/sda or /dev/hda MBR linux admin 2016-01-27 1168
71 Linux and Unix touch command admin 2015-11-15 1432
70 Configuration of Red Hat 5.4 Xen for SR-IOV Support admin 2015-08-02 1762
69 apt-get install linux-image-2.6.26-2-686-bigmem admin 2015-06-27 1901
68 intel i210 driver install and compile debian admin 2015-06-27 2541
67 Debian / Ubuntu Linux Install Kernel Headers Package admin 2015-06-27 1840
66 mount -t auto /dev/sdb1 /mnt && ls /mnt admin 2015-06-27 1800
65 kali linux 해킹 hacking attack DDOS etc tools admin 2015-06-24 2232
64 sources.list lenny admin 2015-02-03 2648
63 Ubuntu 14.04 원격 접속(xrdp) 설정 admin 2014-12-21 8373
62 Remote Desktop Connection from Windows 7/8 to Ubuntu 14.04 admin 2014-12-21 3225
61 Using Windows RDP to Access your Ubuntu Instance admin 2014-12-21 2871
60 Install GUI on Ubuntu Server admin 2014-12-21 3064
59 How to start GUI from command line? admin 2014-12-21 3053
58 Download all files in a directory using WGET admin 2014-12-16 3031
57 문서 편집기 vi vim command 명령어 정리 admin 2014-10-29 4427
56 find 명령 사용 예제들 admin 2014-10-29 3593
55 특정 IP 엑세스 못하게 하는방법 admin 2014-10-29 3769
54 scp 명령어를 이용한 파일 복사 및 전송 admin 2014-10-29 4423
53 [리눅스] 소프트웨어 레이드의 리빌딩 및 리싱킹 속도를 높이는 5가지 방법 admin 2014-10-17 4004
52 /bin/false, /sbin/nologin 의 차이점 admin 2014-10-13 4799
51 리눅스 시스템 유저 추가 명령어 useradd 사용하기 admin 2014-08-09 4146
50 리눅스 시스템 시작시에 자동 실행할 파일 등록하기 admin 2014-03-22 18951
49 linux 에티터 명령어 정리 포그라운드 전환 : ctrl + z 다시 vi 모드로 돌아오려면 fg admin 2014-03-05 6755
48 Linux Memory Management – Virtual Memory and Demand Paging admin 2014-03-03 6028
47 iptables rules tcp drop all port except tcp 22 admin 2014-02-26 7335
46 seagate HD 시게이트 하드 디스크 A/S 에이에스 기간 조회 및 받는 3가지 방법 admin 2013-12-09 7595
45 SSH Without Authentication Using Key Files (CentOS 5.6) admin 2013-11-22 6773
44 Getting started with SSH public key cryptography admin 2013-09-05 10978
43 암호 없이 SSH 접속하기 admin 2013-09-05 7084
42 Linux Date Command Examples to Display and Set System Date Time admin 2013-07-11 8683
41 FreeRADIUS 설치(freeradius-sever-2.1.8) admin 2013-04-19 14719
40 Radius를 이용한 ssh 인증 서버 구축하기 admin 2013-04-19 11164
39 CentOS 5.4에서 RADIUS 서버 설치하기 admin 2013-04-19 19581
38 Event IP 20187 admin 2013-04-08 7000
37 리눅스에서 자바(JDK) 설치하기 admin 2013-04-08 7975
36 리눅스 네트워크 설정 멸령어 Linux admin 2013-04-08 7969
35 [linux]리눅스 버전및 CPU등 환경정보 확인하기 admin 2013-04-08 22799
34 Linux 시스템 백업과 복원 admin 2013-04-04 7349
33 tar로 전체시스템 백업 LINUX Backup admin 2013-04-04 16802
32 다운된 리눅스서버 응급복구 admin 2013-03-28 10568
31 Build a RADIUS server on Linux admin 2013-03-23 9239
30 Deploying FreeRADIUS with the MySQL Cluster Database file admin 2013-03-22 7656
29 FREE RADIUS 활용및 응용 admin 2013-02-23 18050
28 리눅스에 RADIUS 서버 구현하기 admin 2012-09-01 38048
27 Debian CD DVD 다운로드 링크 헤메지말고 바로 다운로드하지요 admin 2012-08-18 8262
26 Site builder shootout: Drupal vs. Joomla vs. WordPress admin 2012-07-15 27596
25 WinXP 부팅안되는 현상 NTLDR is missing 메세지 admin 2012-07-12 8874
24 윈도우XP 알면 정말 편한 숨겨진 기능 60가지 admin 2012-05-11 11321
23 한국인/국내기업은 얼마나 Linux Kernel에 기여할까? admin 2012-04-29 9600
22 scp, ssh, rsync등을 사용할때에 SSH 비밀번호 묻는것 피하기 admin 2012-04-15 9377
21 [Linux/SSL] 리눅스 서버에 Apache 2 설치 및 SSL 설정하기(mod_ssl, openssl) admin 2012-04-15 10191
20 리눅스의 막강한 네트워크 필터 iptables admin 2012-04-15 8485
19 Centos net install web http admin 2012-03-02 12229
18 Linux 시스템 백업과 복원 admin 2012-02-28 9533
17 검색 파일리스트 만든 다음 여러파일 한방에 압축하기 admin 2012-02-14 10300
16 linux 파티션 디렉토리 용량 확인방법 전체 폴더 크기 사이즈 admin 2012-01-05 10646
15 How to disable IPv6 in Debian Lenny and Squeeze admin 2011-12-29 8827
14 리눅스 네트워크 설정 LINUX admin 2011-12-19 9565
13 다양한 사운드 파일있는곳 admin 2011-12-19 7964
12 모든 CPU 벤치마크 수치 admin 2011-12-16 9782
11 Wireshark admin 2011-12-16 8220
10 스트리밍서버 / 윈도우서버 admin 2011-12-16 9424
9 무료백신 여러가지 분류해놓은곳 admin 2011-12-16 8397
8 윈도우 2003 작업 스케줄러 설정 admin 2011-12-16 12848
7 파이썬 설치 및 사용하기 admin 2011-12-16 10754
6 How to disable IPv6 in Debian , 리눅스 아이피설정 admin 2011-12-16 13024
5 리눅스 서버 이전시 고려할 사항들 admin 2011-12-16 11445
4 ftp 파일전송 여러파일을 한번에 통째로 전송 admin 2011-12-16 11309
3 리눅스 tar 압축 백업복원시 소유자 문제해결 admin 2011-12-16 10360
2 서버이전시 고려할 사항들 admin 2011-12-13 11018
1 Name Server 설정및 이해 admin 2011-12-13 7577