[Linuxtrent] Re: aggirare un nat

  • From: Lo'oRiS il Kabukimono <lo_oris@xxxxxxxxx>
  • To: linuxtrent@xxxxxxxxxxxxx
  • Date: Mon, 7 Apr 2003 17:09:00 +0200

"diaolin..." <diaolin@xxxxxxxxxxx> :

> ssh -R 22022:localhost:22 macchinaesterna
> quando sono connesso e la mia connessione è up
> dalla macchinaesterna riesco a
> ssh -p 22022 localhost

grazie a questo ho tirato fuori questo script semplice da mettere in
/etc/init.d

++++
#!/bin/sh -e

SERVER=server.to.connect
USER=user.in.the.server

case "$1" in
        start|restart|reload|force-reload)
                echo fast-swish: establishing connection to $SERVER as user
$USER                ssh -R 22022:localhost:22 $USER@$SERVER &
            ;;
        stop)
                echo fast-swish: i should stop, but stopping is not
implemented yet            ;;
esac
++++

nota che è necessario che la chiave pubblica di root sul client (nattato)
sia nelle autorizzate dell'utente sul server.

-- 
"Never give up  Never give in  Be on our side  So we can win
 Never give up  Never give in  Be on our side
 Old moon's time is soon to come"
  - Blind Guardian, "And then there was silence"

http://lano.webhop.net ·-:=[asd]=:-· http://lano-forum.webhop.net
-- 
Per iscriversi  (o disiscriversi), basta spedire un  messaggio con SOGGETTO
"subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx


Other related posts: