SSH jako VPN
- Dodano: 29 November 2007
- Wprowadził: kocio
- Komentarze: 72
Wystarczy tylko jeden wolny port i SSH, aby połączyć dwie sieci bezpiecznym tunelem, który w wielu wypadkach zachowuje się praktycznie jak VPN. Nie jest to może pełne zastępstwo, ale za to nie potrzeba żadnego innego oprogramowania, a cała konfiguracja jest dosyć prosta i przejrzysta.
Nie wierzycie? Nie lekceważcie potęgi SSH!
Więcej informacji: http://www.redhatmagazine.com/2007/11/27...-software/
Znalazłeś literówkę? Zgłoś ją używając formularza!
Jeśli uważasz, że ten nius jest nieobiektywny, przedstawia nieprawdziwe wydarzenie, jest spamem lub nie spełnia standardów serwisu, napisz raport.
Niusy na podobny temat:
Komentarze są prywatnymi opiniami dodających je osób. Prosimy o zachowanie kultury wypowiedzi. Komentarze obraźliwe oraz obniżające poziom serwisu będą usuwane. Więcej w regulaminie komentowania.
72 komentarzy
Wszystkie autorskie niusy w serwisie publikowane są na licencji Creative Commons Uznanie autorstwa 2.5 Polska.
Ja polecam inne – prostsze rozwiązanie.
W ssh jest także parametr -D służący do tworzenia dynamicznych tuneli. Wystarczy połączyć się z naszym shellem z opcją -D 8080 aby utowrzyć lokalny serwer SOCKS 5 na porcie 8080. Dodatkowo proxy można przyłączyć do dowolnego lokalnego interfejsu lub do * – czyli każdego.
Tunel dynamiczny można dodać w ~/.ssh/config jako
<code>DynamicForward 8080</code> lub przykładowo <code>DynamicForward *:8080</code> co spowoduje, że przez nasze proxy będzie mozna się łączyć z całego LAN'u.
Mając tak skonfigurowany i połączony tunel wystarczy w ulubionym programie pocztowym, przeglądarce czy komunikatorze ustawić proxy SOCKS na nasze ip oraz nasz port. Po tej operacji będzie można się łączyć na dowolny serwer znajdujący się w zdalnej sieci, a także na każdy dostępny host w internecie o ile umożliwiony jest taki ruch przez administratora.
Jeżeli jednak przeglądarka / program / klient nie obsługuje SOCKS, pozostaje ciekay projekt o nazwie tsocks – transparent socks. Wystarczy w pliku konfiguracyjnym /etc/tsocks.conf ustawić ip połączonego tunelu (czyli najczęściej 127.0.0.1) , wersję serwera SOCKS oraz port
Przykładowo
<code>
server = 127.0.0.1
server_type = 5
server_port = 8080
</code>
Po konfiguracji wystarczy odpalić nasz program nie tak jak zawsze ale poprzedzając go komendą tsocks. np $ tsocks opera czy też tsocks svn
Ostatnim ciekawym elementem układanki jest pakiet autoSSH. Umożliwia on zestawienie stabilnego tunelu ssh. W razie padu po zdalnej stronie będzie próbować automatycznie przywrócić połączenie – aż do skutku. W takim wypadku przyda się także autoryzacja ssh za pomocą klucza bez hasła, ale o tym już nieraz pisano, więc zanelzienie tutoriala nie będzie stanowić dla nikogo większego problemu.
komentarz i dluzszy i bardziej tresciwy niz news
o tsocks nawet nie wiedzialem – dzieki za info
kocio – moze warto kolejnego newsa w oparciu o ten komentarz? latwiej takie rzeczy wyszukac w historii wpisow, niz komentarzy…
Może niech sam barteq zrobi wpis na jakilinux.org
I to jest odpowiednie podejście. =} Ja nie napiszę, bo się na tym nie znam tak dokładnie, a skoro barteq wie, to fajnie jeśli zechce się tym podzielić szerzej.
Od siebie powiem tylko, że to rozwiązanie nadaje się tylko dla małych wdrożeń. Przepis podany u Red Hata jest prostszy w utrzymaniu, bo wszystko dzieje się na poziomie serwera. Wiem jaki jest np. problem z przypisywaniem adresów IP ręcznie – powyżej powiedzmy 20 maszyn DHCP jest jednak bardziej praktyczne.
Popieram przedmówcę
podobny artykuł już jest na jakilinux.org
To już zostało opisane na jakilinux:
http://jakilinux.org/aplikacje/sztuczki-z-ssh-2-t…
Ale oczywiście uwaga trafna i w pełni funkcjonalna.
Używam jej od dawien dawna jak tylko trafię na jakieś ograniczenia w dowolnej sieci, i w wielu innych przypadkach:)
AutoSSH jest fajne, ale problem jest z wykrywaniem "padów" łącza. Musi minąć timeout, żeby autossh zauważyło, że coś jest nie tak i ponowiło próbę nawiązania połączenia.
W taki sposób właśnie obchodziłem firewalla w akademikach PS i wychodziłem z maksymalnym łączem jakie udostępnia polibuda
Można się wtedy cieszyć dostępem do publicznych hubów DC, Kazaa (kiedyś popularna), serwerami gier i innymi usługami…
Ale to tylko grami na TCP, nie?
My mamy zablokowany cały ruch na zewnątrz i udostępnione tylko SSH i proxy, więc w Quake'a nie da rady pociąć. Jest jakiś sposób, oprócz Hamachi, które wymaga kumpli z tym samym softem, żeby móc się łączyć z grami na zewnątrz po udp?
Możesz spróbować tak: http://danadam.jogger.pl/2007/01/26/starcraft-zab…
Przez proxy spokojnie openvpn leci…
Ale OpenVPN wymaga odpowiedniego oprogramowania gdzieś na serwerze, nie? I jeżeli takie coś będę miał to będzie to działało jak LAN, z możliwością łączenia się z globalnymi serwerami?
potrzebujesz 1 komputera, podlaczonego gdziekolwiek na Swiecie, posiadajacego "zewnetrzne" IP z nieblokowanym ruchem UDP.
Stawiasz na nim openvpn i wio. Jak chcesz wychodzic na "swiat" przez tunel to kwestia konfiguracji routingu na swojej maszynie i SNAT/DNAT na maszynie gdzie stoi OpenVPN.
Do zrobienia w 20 minut.
nie prosciej sobie OpenVPN postawic?
Jest to podobnie proste i wystarczy 1 otwarty port.
…trzeba tylko pamiętać że dwa stosy TCP, jeden na drugim potrafią się pięknie krztusić
Mi się jakoś nie krzytuszą.
moze ktors wie jak zrobic cos taiego zeby pograc sobie przez ssh.
VPN daje taka mozliwosc a ssh jak…. ?
Jeżeli <code>tsocks</code> jest dla Ciebie niewystarczające (niewygodne), dobrą alternatywą może być bardziej zaawansowane rozwiązanie opierające się na zrobieniu SOCKS-owego proxy zupełnie przezroczystym z pomocą <code>redsocks</code> i <code>iptables</code>. Szkic rozwiązania w języku angielskim: Making SOCKS proxy transparent. Uprzedzam, że how-to nie jest bardzo szczegółowe – zakłada podstawową wiedzę administracyjną. Jest za to chyba dobrym punktem startowym do innych zakręconych konfiguracji.
This post seems to get a good ammount of visitors. How do you get traffic to it? It gives a nice individual spin on things. I guess having something real or substantial to say is the most important factor.
prodigious journal you’ve chalk up
With havin so much content do you ever run into any issues of plagorism or copyright violation? My website has a lot of completely unique content I’ve either authored myself or outsourced but it appears a lot of it is popping it up all over the internet without my authorization. Do you know any solutions to help reduce content from being ripped off? I’d truly appreciate it.
I really liked your post, thanks for sharing. — Shrewsbury Fire Departments
While I tend to side with the post I strongly believe that car insurance has become too complex for the average policy holder. Just like any important purchase however you must perform due diligence and research the companies before you buy.
One thing I want to touch upon is that weightloss program fast is possible by the perfect diet and exercise. People’s size not merely affects appearance, but also the overall quality of life. Self-esteem, melancholy, health risks, plus physical abilities are impacted in an increase in weight. It is possible to just make everything right and still gain. If this happens, a condition may be the offender. While a lot food rather than enough exercising are usually the culprit, common medical ailments and popular prescriptions can easily greatly enhance size. Thanks a bunch for your post right here.
I enjoy this site!
You made some decent factors there. I looked on the internet for the issue and located most people will go together with with your website.
What a super site and interesting posts, I will add a link on my blogroll and bookmark this site. Regards! Thanks! Cheers! La Porte
This is very important. Thanks for sharing this short article.
One thing I would really like to say is the fact before obtaining more laptop or computer memory, check out the machine directly into which it would be installed. When the machine is definitely running Windows XP, for instance, the memory limit is 3.25GB. Setting up above this would merely constitute any waste. Make sure one’s mother board can handle the particular upgrade amount, as well. Good blog post.
Just remember though what comes up must also come down.
These days, it is possible intended for Wii owners to intelligently run an unlock software and can download complete the additional features and never having to kill their gadget.
Phytessence wakame works by way of inhibiting an enzyme that reduces hyaluronic acid in skin.
Excellent blog post! I’ll subscribe to fix presently wth items feedreader application!…
This is really any rather effective view i believe, Really have to say that you happen to be One in the most beneficial people When i have you ever came across.Appreciate you posting this entertaining blog post.
Excellent Report.nice one for have..a great deal more hold it ..
…
Continue your good work.
I find your entire entry fascinating will I’ve more the Trackback to barefoot along my best web page
……
Exceptional posting! I’ll signed up best suited currently wth this feedreader program!…
Wow! What a blog! I actually like how it is user-friendly on my eyes and as well the information are well scripted. I am curious how I might be notified whenever a brand-new mail has been successful. I have signed to your rss feed which must perform the trick! TX again!
Very effectively written information. It is going to be useful to anyone who usess it, including myself. Keep up the great work – for sure i will try extra posts.
Very efficiently written information. It is going to be beneficial to anyone who usess it, including myself. Sustain the good work – for sure i will check out extra posts.
Great beat ! I wish to apprentice while you amend your web site, how could i subscribe for a blog site? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear concept
Great blog. Many blogs like this cover subjects that can’t be found in print. I don’t know how we got on 15 years ago with just print media.
Good to know
Assets such as the a single you mentioned right here will probably be extremely helpful to myself!
Great site here. So many blogs like yours cover subjects that can’t be found in print. I don’t know how we got on 15 years ago with just newspapers and magazines.
Saved as a favorite, I really like your blog!
Your place may be valueble in my position. Thanks a bunch!…
I want to express my love for your kindness giving support to those people who require help with this important topic. Your very own dedication to passing the solution around came to be incredibly practical and has consistently empowered people much like me to achieve their aims. Your new invaluable tutorial means a great deal to me and somewhat more to my mates. With thanks; from all of us.
Howdy! This is my 1st comment here so I just wanted to give a quick shout out and say I truly enjoy reading through your posts. Can you recommend any other blogs/websites/forums that deal with the same subjects? Thank you!coach outlet
Very helpful
I like the site layout . How was it made!? It is so good!
My husband and i are trying to obtain a 00. 00 personal personal loan, we are newly-weds and I’m hoping to advance to Texas in January being with him. He’s within the Army, and I’m currently unemployed so he is on your own with an income right now.
Thanks a lot for providing individuals with an exceptionally splendid opportunity to read in detail from this web site. It’s always very pleasing plus jam-packed with a good time for me personally and my office acquaintances to search your blog not less than three times in one week to read through the fresh things you have got. And indeed, I am certainly astounded with your unique creative ideas you serve. Certain 2 tips in this post are unquestionably the most impressive we have all had.
Thanks bro
I notice you have not written yet another weblog for a time?
Seo needs a great search engine optimizer plan. Simply one in all these strategies could make a giant distinction in your sites position and company your website brings you.
I much prefer a place where I could take all muscle building information from one source. Don’t get me wrong, this article is great. I’m going to link this on my site and refer it to others.
Highly rated post. I be taught something totally new on totally different blogs everyday. Deciding on one . stimulating to learn the paper content from other writers and learn somewhat one thing from their website. I’d like to use sure of this content on my blog you’re mind. Natually I’ll give a hyperlink right here we are at your web-site. Admire your sharing.
Your site offers a lot of unique insights and information. I haven’t really thought about it like that.
Old hammered coins are becoming increasingly popular among collectors that appreciate the history and culture which is engrained in their very essence.
Many thanks for posting this, It?s just what I was researching for on bing. I?d loads comparatively hear opinions from an individual, slightly than an organization internet page, that?s why I like blogs so significantly. Many thanks!
There is noticeably a bundle to know about this. I assume you made certain nice points in features also.
Greetings! A person’s content stones which explains a real very good be aware of!…
Hello intelligent points.. now why didn’t i consider these? Off topic barely, is this web page pattern merely from an strange set up or else do you use a customized template. I use a webpage i’m seeking to improve and well the visuals is probably going one of the key things to complete on my list.
I recently came across your blog post internet site on the search engines and also double check primarily a person’s beginning discussions. Continue to keep in the nice operate. I other encourage RSS feed so that you can the little Windows live messenger Thing Subscriber. Needing forward to perusing a great deal more of your stuff in the future!…
Best wishes because of this submitting posts, males, engage the terrific operate…
Outstanding brief and that page solved the problem loads. Express gratitude We seeking all your information….
This web site is known as a walk-through its the knowledge you wanted with this and decided not to be familiar with who to inquire. Look here, and you will then without doubt learn about them.
I¡¦ll immediately grasp your rss feed as I can not to find your e-mail subscription hyperlink or newsletter service. Do you’ve any? Kindly allow me recognise so that I may just subscribe. Thanks.
Outstanding post, you have pointed out some wonderful points , I besides believe this s a very great website.