I-OpenVPN ingenye yezinketho ze-VPN (inethiwekhi yangasese yangasese noma amanethiwekhi azimele wangasese) ekuvumela ukuthi uqalise ukudluliswa kwedatha ngesiteshi esifihliwe esakhiwe ngokukhethekile. Ngakho-ke, ungaxhuma amakhompyutha amabili noma wakhe inethiwekhi eyodwa neseva namakhasimende amaningi. Kulesi sihloko, sizofunda ukuthi ungayakha kanjani iseva enjalo futhi uyilungiselele.
Silungiselela iseva ye-OpenVPN
Njengoba kushiwo ngenhla, sisebenzisa ubuchwepheshe okukhulunywa ngabo, singadlulisela imininingwane ngesiteshi sokuxhumana esivikelekile. Lokhu kungaba ukushintshana kwefayela noma ukufinyelela okuphephile kwi-Intanethi kuseva eyindlela evamile. Ukuyakha, asidingi imishini eyengeziwe kanye nolwazi olukhethekile - konke kwenziwa kukhompyutha okuhlelwe ukuthi isetshenziswe njengeseva yeVPN.
Ngomsebenzi owengeziwe, kuzodingeka futhi ukumisa ingxenye yamakhasimende kumishini yabasebenzisi benethiwekhi. Wonke umsebenzi wehla ekwakheni okhiye nezitifiketi, ezidluliselwa kumakhasimende. Lawa mafayela akuvumela ukuthi uthole ikheli le-IP lapho uxhuma kwiseva futhi wakhe isiteshi esifihliwe esishiwo ngenhla. Yonke imininingwane edluliswa ngayo ingafundwa ngokhiye kuphela. Lesi sici singathuthukisa kakhulu ukuphepha futhi siqinisekise ukuphepha kwedatha.
Faka i-OpenVPN emshinini we-server
Ukufaka kuyinto evamile enama-nuances athile, esizokhuluma ngawo ngokuningiliziwe.
- Isinyathelo sokuqala ukulanda uhlelo kusixhumanisi esingezansi.
Landa i-OpenVPN
- Okulandelayo, gijimisa ukufaka futhi ufike ewindini lokukhetha ingxenye. Lapha sidinga ukubeka umucu eduze kwento enegama "EasyRSA", okuvumela ukuthi udale futhi uphathe isitifiketi namafayela wokhiye.
- Isinyathelo esilandelayo ukukhetha indawo ongayifaka. Ukuze kube lula, faka uhlelo ezimpandeni zesistimu yohlelo C :. Ukuze wenze lokhu, mane ususe okwedlulele. Kufanele kuphume
C: OpenVPN
Senza lokhu ngenhloso yokugwema ukushayeka lapho kwenziwa imibhalo, ngoba izikhala ezisendleleni azamukeleki. Yebo, ungazibeka emaphuzu wokucaphuna, kepha ukunaka kungaphinde kwehluleke, futhi ukufuna amaphutha kukhodi akuwona umsebenzi olula.
- Ngemuva kwazo zonke izilungiselelo, faka uhlelo kwimodi ejwayelekile.
Ukulungiswa kwecala leseva
Lapho wenza izinyathelo ezilandelayo, kufanele uqaphele ngangokunokwenzeka. Noma yikuphi ukushiyeka kuzoholela ekusebenzeni kweseva. Okunye okudingekayo ukuthi i-akhawunti yakho kumele ibe namalungelo wokuphatha.
- Siya kumkhombandlela "lula-rsa", esesimweni sethu itholakala kuyo
C: OpenVPN kulula-rsa
Thola ifayela vars.bat.sampula.
Qamba kabusha ukuthi ama-vars.bat (susa igama "isampula" kanye ichashaza).
Vula leli fayela kusihleli se-Notepad ++. Lokhu kubalulekile, ngoba yilebhukwana elikuvumela ukuthi uhlele kahle futhi ugcine amakhodi, okusiza ukugwema amaphutha ngenkathi kwenziwa.
- Okokuqala, sisusa wonke amazwana aqokonyiswe eluhlaza - azomane asiphazamise. Sithola okulandelayo:
- Okulandelayo, shintsha indlela eya kufolda "lula-rsa" lena esayikhomba ngesikhathi sokufakwa. Kulokhu, vele ususe okuguquguqukayo % Ama-ProgramFiles bese uyishintsha ibe C:.
- Amapharamitha amane alandelayo ashiywe engashintshiwe.
- Imigqa esele igcwaliswa ngokunqumela. Isibonelo kusikrini.
- Gcina ifayili.
- Udinga futhi ukuhlela amafayela alandelayo:
- yakha-ca.bat
- yakha-dh.bat
- ukwakha-ukhiye.bat
- ukwakha-ukhiye-pass.bat
- ukwakha-ukhiye-pkcs12.bat
- build-key-server.bat
Badinga ukuguqula iqembu
ukuvula
indlela ephelele yefayela layo elihambisanayo kuvula.exe. Ungakhohlwa ukusindisa izinguquko.
- Manje vula ifolda "lula-rsa"ukubambelela I-Shift futhi sichofoza i-RMB esihlalweni esingenalutho (hhayi kumafayili). Kumenyu yokuqukethwe, khetha "Vula iwindi lomyalo".
Kuzoqala Umugqa womyalo ngokushintshela kufolda yenkomba eseqediwe ukuqeda.
- Sifaka umyalo okhonjiswe ngezansi bese uqhafaza ENTER.
ama-vars.bat
- Okulandelayo, qala elinye "ifayela le-batch".
hlanza-konke.kodwa
- Phinda umyalo wokuqala.
- Isinyathelo esilandelayo ukudala amafayela adingekayo. Ukuze wenze lokhu, sebenzisa umyalo
yakha-ca.bat
Ngemuva kokubulawa, uhlelo luzohlinzeka ngokuqinisekisa imininingwane esiyifakile kufayela le-vars.bat. Mane uqhafaze amahlandla ambalwa ENTERkuze kuvele umugqa womthombo.
- Dala ukhiye we-DH usebenzisa ukuqaliswa kwefayela
yakha-dh.bat
- Silungiselela isitifiketi sohlangothi lweseva. Kunephuzu elilodwa elibalulekile lapha. Udinga ukunika igama esilipelile ama-vars.bat emgqeni KEY_NAME. Esibonelweni sethu, lokhu Ama-Lumpics. Umyalo unje:
build-key-server.bat Ama-Lumpics
Lapha futhi udinga ukuqinisekisa idatha ngenkinobho ENTER, futhi ufake incwadi kabili "y" (yebo) lapho kudingeka khona (bheka isithombe-skrini). Ulayini womyalo uvaliwe.
- Kukhathalogi yethu "lula-rsa" ifolda entsha enegama "okhiye".
- Okuqukethwe kuyo kudinga ukukopishwa nokunamathiselwe kufolda "ssl", okumele idalwe kumkhombandlela wohlelo wohlelo.
Ukubuka kwefolda ngemuva kokunamathisela amafayela akopishiwe:
- Manje iya enkombeni
C: OpenVPN hlela
Dala umbhalo lapha (RMB - Dala - Umbhalo wombhalo), uyiqambe kabusha iseva.ovpn bese uvula ku-Notepad ++. Sifaka ikhodi elandelayo:
ichweba 443
proto udp
dev tun
i-dev-node "I-VPN Lumpics"
dh C: OpenVPN ssl dh2048.pem
ca C: OpenVPN ssl ca.crt
i-cert C: OpenVPN ssl Lumpics.crt
ukhiye C: OpenVPN ssl Lumpics.key
iseva 172.16.10.0 255.255.255.0
iklayenti elikhulukazi 32
gcina 10 120
iklayenti-iklayenti
comp-lzo
ikhiye eliphikelelayo
ukuphikelela-tun
i-cipher DES-CBC
isimo C: OpenVPN log status.log
log C: OpenVPN log openvpn.log
isenzo 4
isimungulu 20Uyacelwa ukuthi uqaphele ukuthi amagama ezitifiketi nezikhiye kumele ahambisane nalawo akhiwe kufolda "ssl".
- Okulandelayo, vula "Iphaneli Yokulawula" bese uya ku Isikhungo Sokulawulwa Kwenethiwekhi.
- Chofoza kusixhumanisi "Shintsha izilungiselelo ze-adaptha".
- Lapha sidinga ukuthola ukuxhumana ngokusebenzisa "I-TAP-Windows Adapter V9". Ungakwenza lokhu ngokuchofoza kuxhumano lwe-PCM futhi uye ezimeni zalo.
- Qamba kabusha ukuthi "I-VPN Lumpics" ngaphandle kwezingcaphuno. Leli gama kumele lifane nopharamitha "dev-node" efayeleni iseva.ovpn.
- Isinyathelo sokugcina ukuqala inkonzo. Cindezela isinqamuleli Win + r, faka ulayini ongezansi, bese uqhafaza ENTER.
services.msc
- Thola insiza enegama "I-OpenVpnService", chofoza i-RMB bese uya kuzakhiwo zawo.
- Uhlobo lokuqalisa luqala ku "Ngokuzenzakalelayo", qala insiza bese uqhafaza Faka isicelo.
- Uma senze konke kahle, khona-ke kufanele isiphambano esibomvu sinyamalale eduze kwe-adaptha. Lokhu kusho ukuthi ukuxhumana kulungele ukuhamba.
Ukucushwa kwecala leklayenti
Ngaphambi kokuqala ukumiswa kwamakhasimende, udinga ukwenza izenzo eziningana emshinini wesiphakeli - khiqiza okhiye nesitifiketi sokulungiselela ukuxhumana.
- Siya kumkhombandlela "lula-rsa", bese kufolda "okhiye" bese uvula ifayela inkomba.txt.
- Vula ifayela, susa konke okuqukethwe bese ugcine.
- Buyela emuva "lula-rsa" futhi ugijime Umugqa womyalo (SHIFT + RMB - Vula iwindi lomyalo).
- Okulandelayo, gijimani ama-vars.bat, bese wenza isitifiketi seklayenti.
build-key.bat vpn-iklayenti
Lesi isitifiketi esivamile sayo yonke imishini kunethiwekhi. Ukhuphula ukuphepha, ungakhiqiza amafayela akho ekhompyutha ngayinye, kepha uyiqambe ngokuhlukile (cha "iklayenti le-vpn", futhi "vpn-client1" nokunye). Kulokhu, uzodinga ukuphinda zonke izinyathelo, ngokuqala ngenkomba yokuhlanza.txt.
- Isenzo sokugcina - ukudluliswa kwefayela vpn-iklayenti.crt, vpn-iklayenti.key, ca.crt futhi dh2048.pem kwikhasimende. Ungakwenza lokhu nganoma iyiphi indlela elula, ngokwesibonelo, ubhalele i-USB flash drive noma uyihambise kunethiwekhi.
Sebenzela ukwenziwa kumshini weklayenti:
- Faka i-OpenVPN ngendlela ejwayelekile.
- Vula umkhombandlela ngohlelo olufakiwe bese uya kufolda "hlela". Kufanele ufake isitifiketi sakho namafayela wokhiye lapha.
- Kwifolda efanayo, yakha ifayili yombhalo bese uyiqamba kabusha config.ovpn.
- Vula kusihleli bese ubhala ikhodi elandelayo:
iklayenti
i-solv-retry ayinamkhawulo
nobung
kude 192.168.0.15 443
proto udp
dev tun
comp-lzo
ca ca.crt
cert vpn-iklayenti.crt
ukhiye we-vpn-iklayenti.key
dh dh2048.pem
ukuntanta
i-cipher DES-CBC
gcina 10 120
ikhiye eliphikelelayo
ukuphikelela-tun
isenzo 0Kulayini "kude" ungabhalisa ikheli langaphandle le-IP lomshini weseva - ngakho-ke singena kwi-Intanethi. Uma uyishiya njengoba injalo, kuzokwenzeka kuphela ukuthi uxhumeke kwiseva ngesiteshi esithunyelwe.
- Qalisa i-OpenVPN GUI njengomlawuli usebenzisa isinqamuleli kudeskithophu, bese ku-tray sithola isithonjana esihambisanayo, chofoza i-RMB bese ukhetha into yokuqala enegama Xhuma.
Lokhu kuqeda ukusetha kweseva ye-OpenVPN kanye neklayenti.
Isiphetho
Ukuhleleka kwe-VPN-network yakho kuzokuvumela ukuthi uvikele imininingwane edlulisiwe ngangokunokwenzeka, futhi wenze nokwenza i-inthanethi ukuthi iphephe kakhulu. Into esemqoka ukuthi uqaphele kakhudlwana lapho usetha uhlangothi lweseva nolwekhasimende, ngezenzo ezifanele, ungasebenzisa zonke izinzuzo zenethiwekhi yangasese yangasese.