Maitiro ekugadzira iyo SSH tunnel pakati peLinux server uye Windows mutengi

Pfungwa yekuvaka SSH mugero ndeyekunyorera kwese kubatana (zvisinei, semuenzaniso, kana iwe ukaenda kune iyo https kana http peji) uye batanidza kune Internet kuburikidza ne gwara rakachengeteka. Ichi chiteshi "chakachengeteka" hachisi chinhu chinopfuura a servidor yakagadzirirwa izvi. Iyi sevha inogona kuve, semuenzaniso, mumba mako.


"Kukanganisika" kweiyi nzira ndeyekuti iwe unofanirwa kugara uchivhurwa muchina uyu nekumisikidzwa nenzira kwayo kuti ushande seSSH server, asi inokutendera kuti uvandudze zvakanyanya kuchengetedzwa kwekubatana kwako uye kunyangwe kunzvenga zvirambidzo zvekubatanidza zvinoiswa nevatungamiriri vemambure ( semuenzaniso, rako basa).

Ini ndinonzwa iwe uchibvunza: izvi zvinogona kundibatsira here? Zvakanaka, ngatimbofungidzira mamiriro anotevera: iwe uri mu internet cafe kana muresitorendi ine yemahara Wi-Fi uye unofanirwa kuita kuchinjisa kubhangi kana chimwe chiitiko chakakosha. Ehezve, zvinogara zvichikurudzirwa kuita aya marudzi ekutengeserana munzvimbo yakachengeteka. Zvisinei, pane mhinduro: SSH tunnel. Nenzira iyi, tinogona kubatana neInternet kuburikidza neyedu "yakachengeteka" server.

Iyi nzira inobatsirawo kudzora zvirambidzo zvinoiswa pakubatana kwenzvimbo dzakawanda dzebasa. Haugone kuwana YouTube kubva kubasa? Zvakanaka, SSH tunnel inogona kunge iri mhinduro, sezvo zvese zvikumbiro zvichaitwa kuburikidza neyako "yakachengeteka" server. Mune mamwe mazwi, sezvo IP ye server yako yakachengeteka isina kuvharirwa (hongu, kune rimwe divi, maYouTube) iwe unozogona "kunzvenga" ichi chinorambidzwa (kusakwanisa kuwana YouTube) kubvira kune maneja wekambani yako yekambani. muchina wako waingokurukura neesevha yako "yakachengeteka" uye hauna zano rekuti kuburikidza nawo urikunyatsotsvaga akawanda mapeji.

Muchidzidzo ichi ticha tsanangura iyo "yakajairika" kesi: Linux server, Windows mutengi.

Gadzira Linux server

1.- Isa iyo SSH server. Kuti ndiite izvi, ndakavhura terminal ndokumhanya:

En Ubuntu:

sudo apt-tora kuisa kuvhura-server

En Arch:

pacman -S inovhura

En Fedora:

yum -y kuisa opensh-server

Ready. Iwe zvino uchakwanisa kuwana iyo Ubuntu (SSH server) ine SSH mutengi.

2.- Kamwe yaiswa, zvinobatsira kuongorora iyo yekumisikidza faira:

sudo nano / etc / ssh / sshd_config

Kubva pane iyi faira iwe unozogona kugadzirisa yako SSH server zviri nyore. Kurudziro yangu ndeyekugadzirisa chete ma parameter maviri: chiteshi uye vanobvumidza.

Kuti udzivise kurwiswa kunogona kuitika, zvinokurudzirwa kushandura chiteshi icho SSH ichashandisa. Nokusingaperi inouya nemutengo makumi maviri neshanu, unogona kusarudza imwe inonyatsokodzera iwe (nekuda kwechidzidzo ichi isu takasarudza 22 asi inogona kuve chero imwe).

Iyo Allowusers paramende inokutendera iwe kudzora kupinda nemushandisi uye, zvingasarudzika, iyo inomiririra kwaunogona kubatanidza. Muenzaniso unotevera unotadzisa kupinda kune server yeSSH kuitira kuti chete-uye-saka-vashandisi vazogona kudaro kubva kumahosi 10.1.1.1 uye 10.2.2.1.

AllowUsers so and so@10.1.1.1 mengano@10.1.1.1 so and so@10.2.2.1 mengano@10.2.2.1

Gadzira iyo router

Muchiitiko chekuti sevha yako iri kuseri kwereta, zvinofanirwa kumisikidza iyo yekupedzisira kuti irege kuvharira zvinouya kubatana. Kunyanya zvakanyanya, iwe unofanirwa kugadzirisa.

Usati waenda kunongedzo uye kuratidza gadziriso inodiwa zvinoita kunge zvine hungwaru kutsanangura zvishoma kuti kutumira-kufambiswa kune chii.

Ngatiti iwe une network yemuno yemamishini matatu, ese ari kumashure kweauta. Iko kubatana kuri kuuya (kubva kuSSH, sezvingave nyaya yedu) kutaura nemuchina 3 yenetiweki yemuno? Usakanganwa kuti "kubva kunze" michina mitatu, kunyangwe iine maIPs emuno, inogovera imwechete yeruzhinji IP iyo yavanobatanidza neInternet.

Mhinduro kudambudziko rataurwa pamusoro apa kutakura-kutakura Nekudaro, kana zvinopinda zvinowaniswa zvikatambirwa kuchiteshi X cheveruzhinji IP, iyo router inozoiendesa kune inoenderana muchina. Nenzira iyi, pese patinobatana kuburikidza neicho chiteshi, tinoziva kuti iyo router iri kuzotidzorera isu (nokudaro kutakura-kutumira-mberi) kune inoenderana muchina. Zvese izvi, zviripachena, zvinofanirwa kuve zvakagadziriswa muiyo router.

Iyo yekufambisa-yekufambisa yekumisikidza inosiyana zvishoma maererano neiyo rauta yauri kushandisa. Inonyanya kushanda kushanya portforward.com, sarudza iyo modhi yemota yauri kushandisa uye uteedzere matanho akatsanangurwa ipapo.

Gadzira Windows mutengi

Kuti ubatanidze kubva paWindows, zvinoshanda kushandisa chishandiso chePutiT seSSH mutengi.

1.- Nhanho yekutanga kurodha pasi PuTTY

Sezvauri kuona pane iyo PuTTY yekurodha peji, pane akati wandei vhezheni zviripo. Ini ndinokurudzira kurodha inotakurika vhezheni yechirongwa: putty.exe. Iko mukana wekusarudza inotakurika vhezheni ndeyekuti iwe unogona kugara uchiitakura newe pane pendrive uye unomhanyisa chirongwa kubva kune chero komputa, chero kwauri.

2.- Vhura PuTTY uye utaure iyo IP (yeruzhinji) uye chiteshi che server iyo iyo SSH mutengi yaanofanira kubatana. Nzira yekuziva sei yeruzhinji IP ye server yako? Nyore, ingo google "ndeipi yeruzhinji ip" kuwana zviuru zvemapeji anopa sevhisi iyi.

3.- Kana iyo "mutengi" iri kuseri kwemumwe munhu, usakanganwa kuimisa nenzira kwayo. Kana iwe usina chokwadi kuti ndeipi dhata yekupinda, vhura Internet Explorer uye enda kune Zvishandiso> Kubatanidza> LAN Zvirongwa> Yepamberi. Kopa uye unamate iyo data inowanikwa ipapo muPuTTY, sezvinoonekwa mumufananidzo pazasi. Mune zvimwe zviitiko, ungangoda kuisa zita rekushandisa uye password.

4.- Izvo zvinodikanwa kuisa iyo data yeiyo «yemuno» chiteshi-kufambisa kuvaka iyo SSH tunnel. Enda kuKubatanidza> SSH> Tunnels. Pano zano ndere rinotevera, isu tinofanirwa kutaurira PuTTY izvo zvinongedzo ku "kutsausa" kune yedu yakachengeteka server. Kuti tiite izvi, isu tinofanirwa kusarudza chiteshi.

Kurudziro yangu, kunyanya kana muchina uri kuseri kwemuchadenga, ndewekuti iwe sarudza chiteshi 443 sezvo iri iyo inoshandiswa neSSL kuita kubatana kwakachengeteka, izvo zvinoita kuti zviomere mutariri kuti aone zvauri kuita. Port 8080, kune rimwe divi, ndiyo inoshandiswa neHTTP (inova isiri "yakachengeteka" kubatana) saka ane ruzivo network maneja anogona kunyumwa uye anogona kunge akatovharira chiteshi kune mamwe marudzi ekubatanidza.

Mukuenda, pinda zvakare IP yeisevha yakachengetedzeka, ichiteverwa nekoloni uye chiteshi chawakavhura mune dhoti rakanzi "Gadzira iyo router" uye mu ~ / .ssh / config faira. Semuenzaniso, 192.243.231.553:443.

Sarudza Dynamic (iyo ichagadzira SOCKS kubatana, iyo yatinozoshandisa mune inotevera poindi) uye tinya Wedzera.

5.- Ndakadzokera kuchiratidziro chikuru chePuTTY, ndikadzvanya Sevha ndokuzarura. Nguva yekutanga yaunobatanidza kuseva, meseji yekuzivisa senge iri pazasi ichaonekwa:

6.- Ipapo, inozokumbira iro zita rekushandisa nephasiwedi nekuwana kune server.

Kana zvese zvikafamba mushe, kana iko kupinda kwacho kwaitwa, iwe unofanirwa kuona chimwe chinhu senge chaunoona pazasi ...

7.- Chekupedzisira, usina kuvhara PuTTY, vhura uye gadzirisa Firefox (kana browser yako yaunofarira) kuti ubatanidze neInternet kuburikidza nePTTTY.


Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa. Raida minda anozivikanwa ne *

*

*

  1. Inotarisira iyo data: Miguel Ángel Gatón
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako

  1.   Jose daniel rodriguez akadaro

    mubvunzo padanho 6 nderipi zita rekushandisa uye password ipi yandinofanira kuisa

  2.   Jose akadaro

    zvakanakisa, ndichaedza kumisikidza pamwe neimba yangu

  3.   Al akadaro

    kuwana internet kubva kumba kwangu:
    dial-up kubatana ne 56k modem,
    Ini ndinomhanya iyo .bat faira ine iyi yekugadziriswa
    @Echo Bvisa
    C:
    Cd C: \ Windows
    putty -N -C -D 1080 -P 443 -ssh mushandisi@00.00.000.000 -pw pfuura
    mbudo
    uye chii chinoenderana ne putty iyo yakagadzirirwa mune iyi
    fomu: mune sarudzo kudzora kushandiswa kweproxy ndakaiisa mu http, mu proxy
    hostname ini ndinoisa proxy yangu uye port 3128 uye zita rekushandisa uye password
    Ini ndaisa data rangu ndichisiya zvese zvimwe zvisina kubatika uye ndichichengeta izvi
    kumisikidza kekutanga sekumisikidza default
    uye kuti ndishandise mozilla, yahoo messenger, nezvimwe, ndinofanira kutsigira
    kunyorera neiyo proxifier vhezheni 3 yakagadzirirwa nenzira iyi:
    mune proxy server nekero 127.0.0.1 chiteshi 1080 sock vhezheni 5,
    mumitemo yekufungidzira ini ndinowedzera iyo putty kunyorera uye nezviito zvandinoisa
    kunanga, kuitira kuti zvirongwa zvese zvibude kuburikidza neizvi.
    Ndinofanira kuziva kuti ndingaite sei pane yangu Android foni iyo
    Ini ndinobatana nepc yangu kuburikidza nekubatanidza uye inogovera yangu kubatana kubva
    runhare kuwana. Ini ndoda dzidziso uye apks kugadzirisa izvi kwandiri
    dambudziko. Kwaziso nekutenda pamberi

  4.   Clint Eastwood akadaro

    Izvo zvaive zvakakodzera kuti utsanangure kuti sevha yeSSH ichaita sei mashiripiti kune zvikumbiro zveHTTP zvinoitwa nemutengi ... kushayisa simba dzidziso ...

    1.    Errol flynn akadaro

      Akashata Clint Eastwood.

      Nezvakatsanangurwa mune dzidziso, "zvemashiripiti", zvinoshanda!

      Kwete zvachose kushaya simba, asi ndingangoti zvakanaka uye kongiri.

      Zvakanyatsotsanangurwa kune vasina ruzivo.

      Reply with quote

      1.    ngatishandise linux akadaro

        Zvakanaka sei kuti zvakakushandira iwe! Kumbundira! Paul.

  5.   DumasLinux akadaro

    Inoshanda chaizvo.

    Sezvo pazasi, SSH tunnel neWinSCP:

    http://www.sysadmit.com/2014/05/linux-tuneles-ssh-con-winscp.html

  6.   JEAMPIERRE ZAMBRANO-CAVE akadaro

    yakakura kwazvo yakanyatsotsanangurwa 5 * ndatenda

  7.   Rodrigo akadaro

    Mubvunzo…
    Ko kana zvandinoda iri tunnel pakati pemachina eLinux? Ndine mamiriro anotevera: Mubasa rangu tiri kutamba nepc, tinoda kuyedza software yemusangano wevhidhiyo, saka taifanira kuisa sevha pane avandonado pc. Dambudziko nderekuti kana uchiisa iyo software (bigbluebutton) iyo yekumisikidza inokundikana ... takaona kuti dambudziko nderekuti kurodha pasi kwechinhu chekumisikidza kuri kuvharirwa (ini handisi musayendisiti wemakomputa, ndiri mudzidzisi mukugara uchidzidza) ...
    Sezvo Kambani iri huru, mikana yekutibatsira kubva kunetiweki yakaderera pane nil ...
    Nekudaro, ini ndanga ndichifunga kubatanidza iyo server (ubuntu server) kuburikidza ne ssh tunnel neimba yangu pc (iyo ine ubuntu) uye nekuisa iyo software ...
    Zvinoita? Vanondibatsira?

  8.   suan akadaro

    Mhoro zvakanaka, ndine mubvunzo, ndinoda kubatanidza kune chishandiso chandinacho pane yangu Debian server iri mumuchina chaiwo, wandakaisa paWindows uye ndinoda kuwana iyo application kubva kune imwe network, mumwe munhu anonditungamira ndapota.

  9.   anonymous akadaro

    Maitiro ekuisa uye kugadzirisa iyo SSH Server
    https://www.youtube.com/watch?v=iY536vDtNdQ

  10.   Tosko akadaro

    Mhoro zvakanaka, ndine mubvunzo unondishungurudza zvakanyanya uye ndafunga kuenda kunobvunza nharaunda .. zvakanaka pano ini, kuti ndione kana uchikwanisa kundibatsira .. Ndiri "mutsva" munyika ye virtualization, linux.

    Mhosva ndeiyi inotevera ini ndaisa muchina chaiwo une linux server 14.04.5 LTS, ndakagadzirisa network muVbox se "bridge adapter" nekusarudza yangu network network. Pane imwe nguva mukati mevhavha yangu, ndakaisa zvinhu zvakati wandei, ndiko kuti, ndine internet yekupinda .. pakati pezvinhu izvo ini ndakaisa iyo SSH sevhisi, ndichisiya chiteshi 22 nekusarudzika uye ftp sevhisi "vsftpd".

    Kana uchinge wabvunza iwo murairo «ifconfig» unondipindura:
    Batanidza encap: Ethernet kero HW 08: 00: 27: d5: 2c: 88
    Kero inet: 192.168.0.13 Diffus.:192.168.0.255 Masc: 255.255.255.0
    ......

    Zvino, kuti ndibatanidze kubva pakombuta yangu (Windows 10) naPutty kune yangu sevha server ndichishandisa ssh (chiteshi 22) ndinoshandisa ip "192.168.0.13", uye zvakafanana neFTP, asi kana ndichida shamwari kuti ibatanidze kubva kumba kuseva yangu kungave kuburikidza neSSH kana FTP hazviite kuti isu tishandise IP iyo yandinoshandisa pakombuta yangu.

    Ndinoda kuziva kuti sei izvi zviri nekuda kwekuti ip "192.168.0.13" Ini ndinofunga inoshanda munzvimbo, ndiko kuti, ndinofanira kumisikidza chimwe chinhu, kugadzirisa / etc / network / interfaces, kugadzirisa chimwe chinhu muma iptables?
    Zvakanaka, ini ndoda server yangu kuti ishande severuzhinji IP kune chero munhu kwaanogona kubatana pamwe nekuwana.

    Ndatenda mberi!