[Linux-bruxelles] HTTP console access ?

GNUtoo GNUtoo at no-log.org
Sam 18 Avr 21:33:17 CEST 2009


On Thu, 2009-04-16 at 15:13 +0200, Didier MISSON wrote:
> 
> linux-bruxelles-bounces+didier.misson=total.com at lists.bxlug.be wrote
> on 16/04/2009 13:27:18:
> 
> > On Wed, 2009-04-15 at 15:34 +0200, Didier MISSON wrote:
> > > 
> > > linux-bruxelles-bounces at lists.bxlug.be wrote on 15/04/2009
> 15:27:51:
> > > 
> > > > 
> > > > On Wed, April 15, 2009 15:02, Didier MISSON wrote:
> > > > > En théorie, un simple shell nous suffirait.
> > > > > (il n'est pas toujours possible de sortir en SSH derrière
> > > "certains
> > > > > équipements réseaux" ...)
> > > > > ;-)
> > > > 
> > > > Hello,
> > > > 
> > > > Bah dans ce cas, tu peux tout simplement faire écouter ssh sur
> le
> > > port
> > > > https ... et tu sépcifie ce port dans ton client ssh, zou :)
> > > > 
> > > > -- 
> > > > [Alain Belkadi] 
> > > 
> > > ah oui ! 
> > > c'est absolument génial... 
> > > c'est ce que je fais avec mon serveur à la maison. 
> > > Même que je fais passer PuTTY via un proxy HTTP sur le port
> 443... 
> > > 
> > > ;-) 
> > > 
> > > .... 
> > > 
> > > 
> > > sauf que, ici, le serveur a AUSSI du HTTPS (Webmail, etc) 
> > > donc, pas moyen de bloquer le port 443 pour du SSH :p)   
> 
> > c'est pas un probleme.
> > J'uttilise apache et ssh sur le meme port 
> 
> ah, ça ça m'intéresse... 
> car je ne sais pas du tout comment faire ça. 
> 
> > avec le script suivant(y'as
> > peut etre d'autres moyens):
> > #!/usr/bin/perl
> >     use strict;
> >     use warnings;
> >     use Net::Proxy;
> >     
> >     Net::Proxy->new(
> >         {   in => {
> >                 type         => 'dual',
> >                 host         => '0.0.0.0',
> >                 port         => 443,
> >                 client_first => {
> >                     type => 'tcp',
> >                     port => 442,     # move the https server 
> >                  #to another port
> >                 },
> >                 server_first => {
> >                     type => 'tcp',
> >                     port => 444,      # good old SSH
> >                 },
> > 
> >                 # wait during a 2 second timeout
> >                 timeout => 2,
> >             },
> >             out => { type => 'dummy' },
> >         }
> >     )->register();
> >     Net::Proxy->set_verbosity(1);
> >     Net::Proxy->mainloop();
> > Denis.
> 
> euh oui... 
> Je n'ai rien compris :p) 
> 
> ça se place où ce script ? 
> Il est lancé comment ? 
> et comment fonctionne-t-il ? 
> 
> Merci 
> 
> -- 
> Didier 
j'ai gentoo donc j'ai creer un fichier init pour lancer ce script au
demarage.
il fonctionne de la maniere suivante:
>What you need is a proxy that can guess what the client wants, but 
>without contacting the server. If it manages to find out which server
>the client wants to connect to, it can then contact the expected server
>and do its usual proxy job.
>Luckily, there is a fundamental difference of behaviour between a
>http/s client and a SSH client:
> *during a HTTP(S) connection, the client "speaks" firs
> *during a SSH connection, the server sends a banner first
http://search.cpan.org/~book/Net-Proxy-0.12/lib/Net/Proxy/Tutorial.pod

j'ai fait un script init gentoo(malheureusement c'est specifique a
gentoo) pour le faire demarer au demarage et avant ssh et apache

voila...(desole du retard...j'ai eu des examens et etait tres occupe
avec mon walkman(j'essaie de creer un rootfs avec un toolchain moderne
afin d'etre compatible...parce que gcc-2.95 c'est pas genial...j'en suis
au serveur X(kdrive)...qui ne veut pas partir))
Denis.






Plus d'informations sur la liste de diffusion Linux-bruxelles