Attivare un tunnel inverso per pubblicare un servizio dietro NAT

Spesso, con l’aggiunta di ulteriori opportuni accorgimenti, è utile poter utilizzare alcuni servizi disponibili all’interno di una rete locale in una sede remota. L’ostacolo in questo caso è costituito dalla funzione NAT che a meno di riconfigurazione dei nodi intermedi non consente un instradamento diretto al server oggetto di interesse: una possibile soluzione è quella di attivare un tunnel inverso.

Una delle funzionalità di OpenSSH è quella di poter attivare dei tunnel; per lo scopo prefissato l’unico prerequisito è poter avere accesso verso la macchina che intende consumare direttamente tale servizio, ovvero anche nel caso sia designato come macchina intermedia (l’idea è quella di attivare un proxy).

Esempio per tunnel inverso dietro NAT

Creare un tunnel inverso con SSH

Il caso più semplice può essere quello di pubblicare un servizio HTTP: l’opzione di nostro interesse è -R alla quale va indicato come parametro una stringa composta dalla porta sull’host remoto al quale il servizio verrà consumato, l’indirizzo della macchina che offre il servizio e la porta, separati da : pertanto la seguente sintassi riassume un classico esempio

ssh -R 10080:localhost:80 utente@macchina.esempio.it

Come anticipato, all’interno di macchina.esempio.it è disponibile alla porta 10080 il servizio HTTP che comunica con la macchina originale e rende disponibile attraverso il tunnel inverso il servizio che lì si trova alla porta 80.

Alternative

In alternativa all’utilizzo di ssh, esistono alcuni servizi che semplificano la configurazione e l’utilizzo, con dei piani introduttivi di primo utilizzo gratuiti.

Quasi sempre sono include delle funzionalità aggiuntive utili per la pubblicazione di demo o sviluppo di servizi web, console di monitoraggio delle richieste e utilità per l’analisi di webhook. I costi dei vari servizi sono piuttosto accessibili e convenienti per una disponibilità già pronta per queste necessita e con profili di offerta diversificati dal singolo utente ad entità più strutturate.

Aperto a segnalazioni per ulteriori alternative.

49 commenti su “Attivare un tunnel inverso per pubblicare un servizio dietro NAT”

  1. This is the perfect blog for anybody who really wants to understand this topic.
    You realize so much its almost hard to argue with you (not that I actually would want to…HaHa).

    You definitely put a new spin on a topic which has been written about for ages.
    Wonderful stuff, just wonderful!

  2. You’re so cool! I don’t believe I have browse through something
    like this before. So great to learn someone with many genuine thoughts on this subject.

    Really.. thanks for starting this up. This web site is something that’s needed on the internet, someone with a little bit
    of originality!

  3. You really ensure it is seem very easy with the presentation however i find this topic to be actually
    something which I believe I would never understand.
    It appears to be too complicated and very broad for me.
    I am looking forward for your post, I’ll try to obtain the hang of this!

  4. Its like you read my mind! You seem to know a lot about this, like you wrote the book in it or something.
    I think that you could do with a few pics to drive the message home
    a bit, but other than that, this is great blog.

    An excellent read. I’ll certainly be back.

  5. Heya i’m the first time here. I came across this board and
    so i discover it really useful & it helped me to out much.

    I really hope to offer something back and help others such as
    you helped me.

  6. Hurrah! Finally I purchased a weblog from which I be effective at actually obtain useful information regarding my study and data.

  7. Things i will not understood is actually how you’re
    not really a lot more neatly-liked than you may be at the
    moment. You are very intelligent. You recognize thus considerably in relation to this topic,
    made me for my part believe it from a lot
    of various angles. Its like women and men will not be interested until it is actually something to
    accomplish with Girl gaga! Your own personal
    stuffs outstanding. Always handle it!

  8. I’m impressed, I have got to admit. Rarely should i run into your blog that’s both educative and engaging, and undeniably, you’ve hit
    the nail in the head. The catch is something too few
    folks are speaking intelligently about. I am delighted I stumbled across this during my seek out something associated with this.

  9. Undeniably believe that that you just stated.
    Your favourite justification appeared to be at the net the easiest factor to take into accout of.
    I only say to you personally, I certainly get irked
    at the same time as folks think of worries they just don’t know about.
    You controlled going to the nail upon the greatest as neatly as outlined out the entire thing without need side effect , people can have
    a signal. Will likely be again to get additional. Thanks
    a lot

  10. My loved ones constantly say that I am killing my time right here at web, but I know I am getting familiarity
    all the time by reading thes good content.

  11. I love whatever you guys tend to be up too. Such clever work and reporting!
    Keep up to date the awesome works guys I’ve added you guys to
    my blogroll.

  12. Its like you read my mind! You appear to know a
    lot about this, like you wrote the book in it or something.
    I think that you can do with some pics to drive the message home a little bit, but other than that, this is
    fantastic blog. A fantastic read. I will certainly be back.

  13. Greetings! I understand this is sort of off topic nevertheless
    i was wondering in the event you knew where
    I could get a captcha plugin for my comment form?
    I’m utilizing the same blog platform as yours and I’m having problems finding one?
    Thanks a good deal!

  14. Currently it sounds like WordPress is the best blogging platform out there
    right now. (from what I’ve read) Is that what you’re
    using on your blog?

  15. I am really impressed with the writing skills and
    in addition using the layout on your blog.
    Could this be a paid theme or would you modify it yourself?
    In any case keep up the excellent quality writing,
    it can be rare to view a great blog this way one today.

  16. I have no idea whether it’s just me or if everybody else experiencing problems with your website.
    It seems like several of the text with your content are running from the
    screen. Can someone else please comment and tell me
    should this be happening directly to them at the same time?
    This may be considered a issue with my browser because I’ve
    had this happen before. Appreciate it

  17. Excellent beat ! I would like to apprentice simultaneously as you amend your website, how could i subscribe to get a weblog site?
    The account helped us a acceptable deal.
    I were a little bit familiar of this your broadcast offered vivid clear concept

  18. Hi, I truly do think this can be a great blog.
    I stumbledupon it 😉 I will return yet again since i have bookmarked it.
    Money and freedom is the best strategy to change, may
    you be rich and continue to guide others.

  19. I tend not to even learn how I finished up here, but I believed this publish was previously good.
    I don’t understand who you’re but definitely you might be going to
    a well known blogger should you really aren’t already.
    Cheers!

  20. I’m extremely impressed with your writing skills
    in addition to using the layout on the blog. Could this be a paid theme or do you customize it yourself?
    In any case maintain the nice quality writing, it’s rare to
    see a nice blog similar to this one nowadays.

  21. I would like to many thanks for the efforts you’ve devote
    writing this site. I truly hope to find out the identical high-grade content of your stuff in the future
    at the same time. The truth is, your creative writing abilities has encouraged me to obtain my own blog now 😉

  22. magnificent put up, very informative. I’m wondering why the contrary specialists of this
    sector usually do not notice this. You must continue your writing.

    I’m confident, you possess a fantastic readers’ base already!

  23. I do not even know how I ended up here, but I assumed this post had been good.
    I tend not to realize who you may well be however certainly you happen to be going to a popular blogger in the event you usually are not already.

    Cheers!

  24. It’s great that you are currently getting ideas from
    this component of writing as well as from our argument made at this particular place.

  25. fantastic points altogether, you just received a emblem new
    reader. What could you recommend with regards to your post
    that you just made some days before? Any certain?

  26. Thanks for the personal marvelous posting! I really enjoyed reading it,
    you may well be an excellent author. I will ensure to bookmark your website
    and definately will often come back down the road.

    I wish to encourage that you just continue your great job, have got a nice morning!

  27. It’s really a cool and helpful piece of information. I’m glad that you simply shared
    this useful information with us. Please keep us informed like this.
    Thanks for sharing.

  28. Hey there, I think your site might be having browser compatibility issues.

    When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping.

    I just wanted to give you a quick heads up! Other then that, great blog!

  29. Excellent items from you, man. I have got remember your stuff previous to and you are
    just extremely magnificent. I actually like what you’ve bought here,
    really like what you happen to be stating and the best way wherein you assert it.
    You happen to be making it enjoyable and you still care
    for to keep it wise. I can’t wait to learn significantly
    more on your part. This can be actually a tremendous site.

  30. Paragraph writing is another excitement, if you be accustomed to afterward
    you are able to write otherwise it can be complicated to write down.

  31. certainly like your site however you have to take a look at the spelling on several of your respective posts.
    A number are rife with spelling issues and I find it very
    bothersome to inform the reality however I’ll certainly come again again.

  32. You actually help it become seem really easy with your presentation however
    I to discover this topic to be actually one important thing that I feel I might never
    understand. It form of feels too complicated and very wide for me.

    I am just looking forward for the next publish, I
    am going to attempt to obtain the hold than it!

  33. Hello! Do you know if they make any plugins to assist with Search Engine Optimization? I’m trying to
    get my blog to rank for some targeted keywords but I’m not seeing very good success.
    If you know of any please share. Thanks!

  34. Pingback: Google
  35. It’s really a great and useful piece of information. I’m satisfied that you shared
    this useful information with us. Please keep us informed like this.
    Thanks for sharing.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.