한국어

네트워킹

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app


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.

조회 수 :
25668
등록일 :
2017.09.20
11:31:17 (*.160.88.18)
엮인글 :
http://webs.co.kr/index.php?document_srl=3311939&act=trackback&key=99e
게시글 주소 :
http://webs.co.kr/index.php?document_srl=3311939
List of Articles
번호 제목 글쓴이 날짜 조회 수
121 debian Ubuntu 에서 Timezone 확인 및 변경하기 쉽게 간단하게 date time admin 2019-11-09 17
120 Install Missing ifconfig Command on Debian ip address admin 2019-11-05 18
119 데비안 vs 우분투 : 데스크탑과 서버로 비교 해외 글 과 댓글 admin 2019-10-31 8
118 Debian vs Ubuntu: Compared as a Desktop and as a Server 데비안 vs 우분투 비교 admin 2019-10-31 7
117 Error : unary operator expected – 쉘스크립트 타입관련 문법 admin 2019-09-14 58
116 vi 에디터에서 ^M 문자 한번에 모두 지우기 ( ^M, ^L을 이해하자) admin 2019-06-20 420
115 데비안 제시 jessie 소스리스트 sourcelist admin 2019-06-17 350
114 File Descriptor (파일 디스크립터) 설명 무엇인가 사용방법 admin 2019-06-01 704
113 Start / Stop and Restart Apache 2 Web Server Command 아파치 시작 스톱 명령어 admin 2019-04-08 612
112 DebianPackageManagement admin 2019-04-08 556
111 리눅스 우분투, 32비트 64비트 확인 명령어 admin 2019-01-06 1907
110 How to install a Debian 9 (Stretch) Minimal Server 데비안 9 설치 admin 2018-06-13 3566
109 Which is better, GCC or Clang? admin 2018-06-13 3204
108 고정ip설정, dns설정(데비안) linux 리눅스 admin 2018-06-13 3882
107 [리눅스] 부팅 시 자동 실행 프로그램 등록|작성자 나눔HN admin 2018-06-01 3840
106 리눅스 서버 유지보수 점검 메인터넌스 상황 파악 admin 2018-04-14 3904
105 Top 20 OpenSSH Server Best Security Practices 보안 대책 실제 적용 admin 2018-04-14 4976
104 Start Stop Restart Apache 2 Web Server Command Debian Ubuntu CentOS RHEL Fedora admin 2018-04-14 3090
103 리눅스 한글 2014 뷰어 다운로드 - hwpviewer admin 2018-03-28 4004
102 리눅스를 백업 복구 tar admin 2018-03-28 6992
101 zip 압축 파일 및 텍스트 파일의 한글 깨짐 해결 방법 admin 2018-03-28 7172
100 Lnux export how to admin 2017-12-17 5606
99 What's the difference between “adduser” and “useradd”? admin 2017-12-15 5450
98 useradd Command 리눅스 admin 2017-12-15 14703
97 How To Install Java with Apt-Get on Ubuntu 16.04 oracle java admin 2017-10-13 6621
96 우분투 Linux(Ubuntu)에 Java설치 및 환경 설정하는 방법 admin 2017-10-13 7549
95 우분투 다운로드 사이트 주소 ubuntu download 16.04.3 17.04 site link admin 2017-10-13 7629
94 How to install Java on linux with no Internet connectivity (using local repository) admin 2017-10-01 6598
93 윈도우 ssh 접속 프로그램 admin 2017-09-29 7970
» openvpn Easy Windows Guide admin 2017-09-20 25668