OpenVPN yog ib qho ntawm VPN kev xaiv (virtual ntiag tug network lossis ntiag tug virtual network) uas tso cai rau koj los siv cov ntaub ntawv hloov chaw dua li cov tsim tshwj xeeb tsim ib qho channel. Yog li, koj tuaj yeem txuas ob lub koos pis tawj lossis tsim kho lub hauv paus rau nruab nrog tus neeg rau zaub mov thiab ob peb tus neeg siv. Hauv tsab xov xwm no, peb yuav kawm paub yuav ua li cas los tsim cov neeg rau zaub mov thiab teeb tsa nws.
Peb txhim kho OpenVPN server
Raws li tau hais saud, siv thev naus laus zis hauv lus nug, peb tuaj yeem xa cov ntaub ntawv los ntawm kev sib txuas lus ruaj ntseg channel. Qhov no tuaj yeem yog cov ntaub ntawv txauv lossis nkag mus siv Is Taws Nem kom ruaj ntseg los ntawm cov neeg rau zaub mov uas yog qhov rooj nkag mus. Txhawm rau tsim nws, peb tsis xav tau cov khoom siv ntxiv thiab cov kev paub tshwj xeeb - txhua yam ua tiav ntawm lub khoos phis tawj uas npaj siab siv cov VPN server.
Rau kev ua haujlwm ntxiv, nws tseem yuav tsim nyog los kho tus neeg siv khoom ntawm cov tshuab ntawm cov neeg siv network. Txhua qhov haujlwm ua haujlwm los tsim cov yuam sij thiab daim ntawv pov, uas tau hloov pauv rau cov neeg yuav khoom. Cov ntaub ntawv no tso cai rau koj kom tau txais tus IP chaw nyob thaum txuas rau lub server thiab tsim qhov kev tsim (encrypted) channel uas hais saum toj no. Txhua cov ntaub ntawv kis tau los ntawm nws tuaj yeem nyeem nrog nkaus xwb nrog tus yuam sij. Cov yeeb yaj kiab no tuaj yeem txhim kho kev ruaj ntseg thiab kom paub meej cov ntaub ntawv kev ruaj ntseg.
Nruab OpenVPN ntawm lub tshuab siv lub tshuab
Kev teeb tsa yog txheej txheem txheej txheem nrog qee qhov nuances, uas peb yuav tham txog nyob hauv ntau yam.
- Thawj kauj ruam yog mus rub tawm qhov program los ntawm qhov txuas hauv qab no.
Download OpenVPN
- Tom ntej no, khiav lub installer thiab tau mus rau lub Cheebtsam xaiv lub qhov rai. Ntawm no peb yuav tsum tso daw nyob ze rau cov khoom uas muaj npe "EasyRSA", uas tso cai rau koj los tsim thiab tswj daim ntawv pov thawj thiab cov ntawv tseem ceeb.
- Cov kauj ruam tom ntej yog xaiv qhov chaw rau nruab. Yuav kom yooj yim, muab cov program tso rau hauv paus ntawm qhov system tsav C:. Ua li no, tsuas yog tshem tawm cov tshaj. Nws yuav tsum tig tawm
C: OpenVPN
Peb ua qhov no kom tsis txhob muaj kev sib tsoo thaum ua tiav cov lus sau, txij li cov chaw hauv kab kev tsis raug tso cai. Koj tuaj yeem, ntawm chav kawm, muab lawv tso rau hauv cov cim kab cim, tab sis kev nco qab siab kuj tuaj yeem ua tsis tiav, thiab saib rau qhov yuam kev hauv qhov chaws tsis yog ib txoj haujlwm yooj yim.
- Tom qab kev teeb tsa txhua qhov, nruab qhov program nyob hauv hom qub.
Neeg rau zaub mov sab teeb
Thaum ua cov kauj ruam hauv qab no, koj yuav tsum ceev faj kom sai li sai tau. Tej kev tsis ncaj ncees yuav ua rau server tsis ua haujlwm. Ib qho ntxiv ua ntej yog tias koj tus lej yuav tsum muaj cov cai ntawm cov thawj coj.
- Peb mus rau hauv phau ntawv teev npe "yooj yim-rsa", uas nyob rau hauv peb cov ntaub ntawv nyob ntawm
C: OpenVPN yooj-rsa
Nrhiav cov ntawv vars.bat.sample.
Ntaus nws rau vars.bat (rho tawm lo lus "coj mus kuaj" nrog rau dot).
Qhib cov ntawv no hauv Notepad ++ editor. Qhov no yog qhov tseem ceeb, vim nws yog phau ntawv no uas tso cai rau koj kho cov lej kom raug thiab txuag tau cov lej, uas yuav pab kom zam dhau qhov ua yuam kev thaum lawv ua tiav.
- Ua ntej tshaj plaws, peb rho tawm txhua cov lus hais hauv ntsuab - lawv yuav tsuas cuam tshuam peb. Peb tau cov hauv qab no:
- Tom ntej no, hloov txoj hauv kev mus rau lub nplaub tshev "yooj yim-rsa" qhov ib peb tau taw qhia thaum lub sijhawm teeb tsa. Hauv qhov no, tsuas yog rho tawm cov sib txawv % ProgramFiles% thiab hloov nws mus rau C:.
- Plaub yam nram no tsis raug muab hloov.
- Cov kab ntawv ntxiv muaj txhij kev sib cav. Piv txwv nyob rau hauv lub screenshot.
- Txuag cov ntaub ntawv.
- Koj kuj yuav tsum tau hloov cov ntaub ntawv hauv qab no:
- tsim-ca.bat
- tsim-dh.bat
- tsim-key.bat
- tsim-yuam-pass.bat
- tsim-yuam-pkcs12.bat
- tsim-yuam-server.bat
Lawv yuav tsum pauv pab neeg
openssl
mus rau txoj kev meej rau nws cov ntaub ntawv sib nug xov openssl.exeCov. Tsis txhob hnov qab txuag cov kev hloov pauv.
- Tam sim no qhib lub nplaub tshev "yooj yim-rsa"clamp Ua haujlwm thiab peb nyem RMB rau ntawm qhov chaw khoob (tsis yog nyob ntawm cov ntaub ntawv). Hauv cov ntsiab lus teb ntawv qhia zaub mov, xaiv "Qhib qhov rai hais kom ua".
Yuav pib Kab hais kom ua nrog rau kev hloov mus rau cov phiaj chaw twb tau ua tiav.
- Peb sau cov kab hais kom ua hauv qab no thiab nyem KHWV.
vars.bat
- Tom ntej no, tua tawm lwm "batch ntawv".
huv-all.bat
- Rov ua thawj lo lus txib.
- Cov kauj ruam tom ntej yog los tsim cov ntaub ntawv tsim nyog. Ua li no, siv cov lus txib
tsim-ca.bat
Tom qab ua tiav, lub kaw lus yuav muab kom paub meej tias cov ntaub ntawv uas peb nkag mus hauv vars.bat ntawv. Tsuas yog nyem ob peb zaug KHWVtxog thaum cov kab pom tshwm.
- Tsim tus yuam sij DH siv cov ntawv tso tawm
tsim-dh.bat
- Peb tab tom npaj daim ntawv pov thawj rau lub server sab. Muaj ib qho tseem ceeb ntawm no. Nws xav kom muab lub npe uas peb sau rau hauv vars.bat nyob rau hauv kab KEY_NAMECov. Hauv peb tus piv txwv, qhov no Ua pobCov. Lo lus txib yog raws li nram no:
tsim-yuam-server.bat Neeg pob
Ntawm no koj kuj yuav tsum tau lees paub cov ntaub ntawv nrog tus yuam sij KHWV, ntxiv rau nkag mus hauv tsab ntawv ob zaug "y" (yog) qhov uas yuav tsum tau ua (saib daim duab screenshot). Cov kab hais kom ua tau raug kaw.
- Hauv peb cov catalog "yooj yim-rsa" daim nplaub tshev tshiab nrog lub npe "yuam sij".
- Nws cov ntsiab lus yuav tsum luam tawm thiab muab ntim rau hauv daim nplaub tshev "ssl", uas yuav tsum tau tsim hauv cov cag ntoo hauv paus ntawm qhov program.
Kev saib nplaub tshev tom qab kev luam cov ntawv theej:
- Tam sim no mus rau phau ntawv teev npe
C: OpenVPN config
Tsim cov ntawv sau ntawm no (RMB - Tsim - Ntawv ntawv), rename nws rau server.ovpn thiab qhib rau hauv Notepad ++. Peb sau cov cai hauv qab no:
chaw nres nkoj 443
proto udp
dev tun
dev-node "VPN Lumpics"
dh C: OpenVPN ssl dh2048.pem
ca C: OpenVPN ssl ca.crt
cert C: OpenVPN ssl Lumpics.crt
qhov tseem ceeb C: OpenVPN ssl Lumpics.key
server 172.16.10.0 255.255.255.0
cov neeg siv siab tshaj plaws 32
kev ceev faj 10 120
tus thov kev pab-rau-neeg
comp-lzo
mob siab rau-qhov tseem ceeb
persist-tun
cipher DES-CBC
xwm txheej C: OpenVPN log status.log
log C: OpenVPN log openvpn.log
verb 4
tu siab 20Thov nco ntsoov tias cov npe ntawm daim ntawv pov thiab cov yuam sij yuav tsum phim cov uas nyob hauv daim nplaub tshev "ssl".
- Tom ntej no, qhib "Tswj Vaj Huam Sib Luag" thiab mus rau Cov Chaw Tswj Xyuas Network.
- Nyem rau ntawm qhov txuas "Hloov cov chaw adapter".
- Ntawm no peb yuav tsum nrhiav qhov txuas los ntawm "TAP-Windows Adapter V9"Cov. Koj tuaj yeem ua qhov no los ntawm txhaj rau PCM kev txuas thiab mus rau nws lub zog.
- Ntaus nws rau "VPN Lumpics" tsis muaj lus sib dhos. Lub npe no yuav tsum sib phim nrog qhov parameter "dev-ntawm" hauv ntaub ntawv server.ovpn.
- Cov kauj ruam kawg yog pib kev pabcuam. Thawb luv Yeej + r, Nkag mus rau kab hauv qab, thiab nyem KHWV.
services.msc
- Nrhiav kev pabcuam nrog lub npe "OpenVpnService", nyem RMB thiab mus rau nws lub zog.
- Pib hom pauv hloov rau "Tau Txais", pib qhov kev pabcuam thiab nyem Thov.
- Yog tias peb tau ua txhua yam zoo, ces tus ntoo khaub lig liab yuav tsum ploj nyob ze ntawm lub adapter. Qhov no txhais tau tias kev sib txuas tau npaj mus.
Neeg lub sab configuration
Ua ntej pib kev teeb tsa cov neeg siv khoom, koj yuav tsum tau ua ntau qhov kev ua ntawm lub tshuab neeg rau zaub mov - tsim cov yuam sij thiab ib daim ntawv pov thawj los txhim kho qhov txuas.
- Peb mus rau hauv phau ntawv teev npe "yooj yim-rsa", tom qab ntawd mus rau lub nplaub tshev "yuam sij" thiab qhib cov ntaub ntawv index.txt.
- Qhib cov ntawv, rho tawm txhua cov ntsiab lus thiab txuag.
- Rov mus "yooj yim-rsa" thiab khiav Kab hais kom ua (SHIFT + RMB - Qhib lub qhov rai hais kom ua).
- Tom ntej no, khiav vars.bat, thiab tom qab ntawd tsim daim ntawv pov thawj neeg siv.
tsim-key.bat vpn-tus thov kev pab
Nov yog daim ntawv pov thawj uas pom zoo rau txhua lub tshuab hauv lub network. Txhawm rau kom muaj kev ruaj ntseg, koj tuaj yeem tsim koj cov ntaub ntawv rau txhua lub khoos phis tawm, tab sis tis lawv cov npe txawv (tsis yog "vpn-tus thov", thiab "vpn-client1" thiab yog li ntawd). Hauv qhov no, koj yuav tsum rov ua tag nrho cov kauj ruam, pib ua kom huv index.txt.
- Kawg ua - hloov ntaub ntawv vpn-client.crt, vpn-client.key, ca.crt thiab dh2048.pem rau cov qhua tuaj noj mov. Koj tuaj yeem ua qhov no kom yooj yim, piv txwv li, sau ntawv rau USB flash drive lossis hloov nws hla lub network.
Ua haujlwm yuav tsum tau ua rau cov neeg siv khoom:
- Nruab OpenVPN li qub.
- Qhib cov ntawv teev npe nrog qhov program nruab thiab mus rau nplaub tshev "teeb"Cov. Koj yuav tsum tso peb daim ntawv pov thawj thiab cov ntawv tseem ceeb ntawm no.
- Hauv tib nplaub tshev, tsim cov ntawv luam cov ntawv thiab pauv nws mus rau config.ovpn.
- Qhib hauv lub editor thiab sau cov cai hauv qab no:
tus thov kev pab
daws teeb meem-rov qab nrhiav qhov tseeb
noble
tej thaj chaw deb 192.168.0.15 443
proto udp
dev tun
comp-lzo
ca CA.crt
cert vpn-cov neeg.crt
yawm sij vpn-client.key
dh dh2048.pem
ntab
cipher DES-CBC
kev ceev faj 10 120
mob siab rau-qhov tseem ceeb
persist-tun
verb 0Hauv kab "chaw taws teeb" koj tuaj yeem sau npe tus IP chaw sab nraud ntawm lub tshuab server - yog li peb tau nkag mus rau hauv Is Taws Nem. Yog tias koj tawm ntawm nws raws li nws, ces nws yuav tsum tsuas yog txuas mus rau lub neeg rau zaub mov ntawm qhov tau tshaj tawm cov channel.
- Khiav OpenVPN GUI ua tus tswj hwm siv qhov shortcut ntawm lub desktop, tom qab ntawd hauv lub phaj peb pom lub cim coj, nyem RMB thiab xaiv thawj yam khoom nrog lub npe Txuas.
Qhov no ua tiav qhov teeb tsa ntawm OpenVPN server thiab tus thov kev pabcuam.
Xaus
Kev koom tes ntawm koj tus kheej VPN network yuav tso cai rau koj los tiv thaiv cov ntaub ntawv sib kis ntau li ntau tau, thiab ua rau kev caij Is Taws Nem Internet kom muaj kev nyab xeeb dua. Qhov tseem ceeb tshaj plaws yog qhov yuav tsum tau ceev faj dua thaum teeb tsa tus neeg rau zaub mov thiab sab rau cov neeg siv khoom, nrog rau kev ua haujlwm zoo, koj tuaj yeem siv txhua qhov zoo ntawm qhov ntiag tug virtual network.