Ir a contenido

 Página 2 de 56 « 1  2  3  4  5 » sig.  Última » 

Howto access a Virtualbox guest machine throught ssh (or how to port forwarding)


This is not an original article (see references), it’s just an archived one “por si las moscas”.

Introduction

By default, the network connection in Virtualbox is set to NAT, that is every packet coming from the Guest machine is modified so that it seems as it has come from the Host machine. In this way it’s easy for the Guest machine to connect to all the rest of the network (the Internet included) but nobody can start a connection with the Guest Machine since it’s hidden behind the Host one.

So, if you want to use a server service in your Guest machine (i.e. Apache or SSH) you have two choices:

  1. pass to Virtualbox Host network connection;
  2. make Virtualbox forward all the packets arriving to a certain port of the Host machine.

This article will describe how to do the latter, in particular in the case of the SSH server. This is an interesting case because it allows you to simulate very well a quite common condition: connecting to a remote LINUX headless machine.

We have a guest machine with a running SSH server which accepts connections on the TCP port 22.
Our goal is to make any packet arriving at a given TCP port (i.e. 2222) of the host machine, to be forwarded to the TCP port 22 of the guest machine.
Fortunately, there is Virtualbox command which permits to do it almost instantly: VBoxManage.

Configuration needed

In our case we will use Debian as the guest machine name (quote in case guest machine name contains spaces), here are the commands that you have to type in the host machine (real one) console as your user (if you use another user it will try to look for its virtual machines):

user@machine $ VBoxManage list vms
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.
Name: debian
Guest OS: LINUX 2.6
UUID: 814e25f4-451e-4582-8d34-71a1cd437cdd
Config file: /mnt/extra/virtualizacion/virtualbox/debian/debian.xml
Memory size: 195MB
[...]
user@machine $ VBoxManage setextradata debian “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort” 2222
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.
user@machine $ VBoxManage setextradata debian “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort” 22
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.
user@machine$ VBoxManage setextradata debian “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol” TCP
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.

HostPort,GuestPort,Protocol are just string examples and can be changed without any consequence. Just remember your choices if you want to remove them later.
I guess you should be careful with pcnet substring, as maybe it should have something to see with your selected network card type.

Testing

Once you have typed the above commands, you need to close the guest machine (a reboot won’t be sufficient), restart it and then connect via SSH with:

anyuser@machine$ SSH -l >user< -p 2222 localhost

Replace localhost with the host machine IP address if you are connecting from another computer.

By the way, you can check which customizations have been already set for your Guest Machine with VBoxManage by typing:

user@machine$ VBoxManage getextradata debian enumerate
VirtualBox Command Line Management Interface Version 1.5.6_OSE
(C) 2005-2008 innotek GmbH
All rights reserved.
Key: GUI/LastWindowPostion, Value: 0,6,1028,820
Key: GUI/Fullscreen, Value: off
Key: GUI/AutoresizeGuest, Value: off
Key: GUI/LastCloseAction, Value: powerOff
Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/Seamless, Value: off
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort, Value: 2222
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort, Value: 22
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol, Value: TCP

or remove one, for example “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort”, by setting it without any value:

user@machine$ VBoxManage setextradata “VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort”

Links and references
Etiquetas: , , , , , , , ,
Te interesará:

¿Escasez de informáticos? Ni de coña


Bien, bien, bien, gente de soitu, bien.

Hace un par de días leía el siguiente artículo en soitu: ¿Terminaremos contratando indios para paliar la falta de ingenieros?. Escrito por Margarita Lázaro (soitu.es) el 07-05-2008.

A lo cual deje un comentario anónimo (vago que es uno) mostrando mi indignación y mi breve opinión sobre el tema.

Pero que falta de rigor es esta.
¡¡QUE VERGÜENZA!!.
¿Dónde esta el contraste de opinión y de fuentes? ¿Por qué sólo hablan los empresarios?
La estrategia del empresario del sector informático es dar el sobo hasta que les permitan traer “carne barata”.
Están muy cabreados y enrabietados. No tienen la sartén por el mango y eso les repatea.
Como tienen que subir los sueldos para que la gente buena no se les vaya, lo que se llama fuga de cerebros, están montando todo este cirio.
Por otra parte, claro que la gente no quiere hacer carrera, para que estudiar si hay trabajos mejor pagados que requieren menos esfuerzo intelectual.
Por favor, si hay un periodista del otro lado, infórmese. Contraste. Hable con la otra parte implicada. Un poquito de por favor.

Pues esta mañana una reconfortante sensación de justicia y equilibrio me ha invadido cuando he leído el artículo que continuaba la senda del anterior ya citado: Los informáticos españoles huyen del país por los bajos salarios.. Escrito también por Margarita Lázaro (soitu.es) el 08-05-2008.

A lo cual se ha ganado mi reconocimiento y he dejado el siguiente comentario:

Enhorabuena Margarita Lázaro por el artículo y por contrastar información cómo pedí ayer en los comentarios del artículo relacionado (No hay ingenieros suficientes).

En cuestión de segundos un par de mis reflexiones, de las que ya no disfrutáis tan a menudo internautillas.

A pesar del tamaño del sector informático carecemos de unión y de unos sindicatos fuertes, e incluso de sindicatos. Creo que es consecuencia de la relativa juventud del sector y de la presión en las grandes y medianas empresas hacia la disolución de cualquier atisbo de organización sindical.
Todo esto conlleva la imposibilidad de plantear una huelga organizada y con una participación razonable.

Es que ahora, como están de moda las huelgas sería un buen momento. Tal y como están las hipotecas y los IPC la gente (sindicatos más bien) ha decidido huelguear y quejarse un poquito. Ya se celebraron las elecciones y justo tras ellas los sindicatos se han puesto manos a la obra. Tantos años sin apenas oír hablar de ellos y justo tras las elecciones, toma, todas las semanas alguien esta de huelga. Sólo en Madrid y Extremadura véanse transportes, sanidad, educación, justicia… Me huele a chamusquina le dijo el alguacil al sereno o alguno a otro.

Etiquetas: , , , , , ,
Te interesará:

WHYFLOSS Madrid Conference 08


¿Cuándo?

En los días 8 y 9 del mes de Mayo se celebrará la cuarta edición de la WhyFLOSS Conference, con entrada libre y gratuita.

Con un importante apoyo de la Escuela de Informática de la Universidad Politécnica de Madrid, Campus Sur se presentarán conferencias variadas entorno a las tecnologías abiertas de IT.

Estarán colaborando en la IV edición del evento compañí­as como SUN, Red Hat, OpenBravo, Andago, SIE, Liferay, Opentia, Monolabs, Accenture, Avanzada7 y universidades como la UPM y la URJC, así­ como comunidades de proyectos como LibreSoft, OpenSolaris y FFII.

¿Dónde?

El evento se realizará en la Escuela de Informática de la Universidad Politécnica de Madrid. Se encuentra ubicada en el Campus Sur de la UPM en la carretera de Valencia Km. 7 en la Ciudad de Madrid (España).
Información de localización de la Whyfloss Madrid 2008

Calendario

DIA 1

9:30
Inauguración WHYFLOSS Conference 08.
Alejandro Sánchez Acosta, Neurowork

10:00
Open-Cities: el reto de la administración electrónica
Guillermo Pastor, Ándago Ingeniería S.L.

11:00
VII Programa Marco en la UE: FLOSS Include y FLOSS Metrics
Jesús Gonzalez Barahona, LibreSoft

12:00
Modelos de negocio basados en Asterisk (la plataforma de VoIP basada en Software Libre)
Juan Ignacio Cabrera, Avanzada 7

13:00
Clustering Computacional en CSIC
Raul Diaz Medina, Sistemas Informáticos Europeos S.L.

14:00
Descanso para comer

16:00
La implicación de la FFII en los estándares abiertos en Europa
Alberto Barrionuevo, Presidente de Foundation for a Free Information Infrastructure (FFII) / OPENTIA, S.L.

17:00
Caso de exito OpenSolaris en Accenture
David Galan Ortiz, Accenture Outsourcing

18:00
¿Es viable el software Open Source en la Industria? El caso de Red Hat LINUX y JBoss
Jesús González de Buitrago, Red-Hat

DIA 2

10:00
Evolución e influencia del Software Libre en los 10 últimos años
Juantomás García, Monolabs

11:00
Liferay Enterprise Portal: The project, the product, the community and how to extend it
Alvaro del Castillo San Félix, Liferay Inc.

12:00
Openbravo: las claves del éxito del desarrollo en las aplicaciones en software libre
Representative, OpenBravo Inc

13:00
Rocks: Distribucion para clusters computacionales
Jesús Espino García, Sistemas Informáticos Europeos

14:00
Descanso para comer

16:00
Seguridad en OpenSolaris
Victor M. Fernandez, SIA / OpenSolaris Hispano

17:00
Django: Framework MVC en Python
Jesús Espino García, Sistemas Informáticos Europeos

Notas personales (idem a la pasada edición):

  • He de decir que conozco al organizador principal.
  • Yo voy
Referencias y enlaces
Etiquetas: , , , , , , , , ,
Te interesará:

Switch/Migration of Subversion repository without admin access (svn2svn)


Hello fellows.
My latest adventure was about moving a project (unmaintained) from its public subversion repository which of course I was not admin (which means no admin access) over to my own server.

Usually, to do this you’d dump the whole thing with svnadmin into one file (svnadmin dump > file_dump) and load it again at the new location (svnadmin load file_dump). After searching for any similar command without admin access into documentation I figured that something similar might exist for plain svn to svn migration.
I founded a ruby version and a python. I chose python one because it’s recent, it’s python and it’s under google code site.
There was other cause, the ruby version went through all revisions, from 1 till infinity, although many of them didn’t have any change. In the other hand, python version uses subversion logs and made a efficient use of it.

The real action

Create a repository in my server was easy:

root@aristoteles:/var/lib/svn$ rm -rf MY-PROJECT-PATH
root@aristoteles:/var/lib/svn$ svnadmin create MY-PROJECT-PATH
root@aristoteles:/var/lib/svn$ chgrp svn-user MY-PROJECT-PATH/ -R
root@aristoteles:/var/lib/svn$ chmod g+ws MY-PROJECT-PATH/ -R
root@aristoteles:/var/lib/svn$ chmod o-rx MY-PROJECT-PATH/ -R

After solving the problems I talk about, duplicating the repo was not so difficult.

user@othermachine:~$ mkdir tmp
user@othermachine:~$ cd tmp
user@othermachine:~$ svn co URL-DEST-MY-PROJECT-PATH
user@othermachine:~$ python svn2svn-0.1.1.py -r 7382 URL-ORIG URL-DEST-MY-PROJECT-PATH

This process took a while but the new directory was now ready for action.

Be careful with your subversion config files. It may cause conflicts with file in repositories.
As an example, I had some troubles because I use to ignore files like Makefile.in and so. The project I was trying to import did have files like that and svn2svn did bring svn errors because those files were not under revision. When I realized I modified my subversion config without that rules for a while.

References and links
Etiquetas: , , , , ,
Te interesará:

¡Que no Bajamos!


Análisis de Nokia Maps


Esta entrada está patrocinada a través de zync.es.

Según dice Nokia

Nokia lanza Nokia Maps, una herramienta gratuita para dispositivos móviles seleccionados que te permite descargar mapas para ayudarte a localizar lugares interesantes o ubicar el lugar al que quieres ir. Además puedes compartir localizaciones con tus amigos, al tiempo que te ofrece magníficas guías urbanas.

Según nosotros

Lo primero que observamos del producto, como corresponde a una compañía con pasta, es que te obsequian con una monísima e incómoda animación flash que más de uno cerrará a los 10 segundos.
Tras esto, aparecemos en la web de nokia españa dedicada a nokia maps.
Si vas a intentar descargar el producto y miras que tu móvil es compatible en la sección de compatibilidad pero luego no lo encuentras al ir a descargar el software para éste desde la sección descargas, mala suerte para ti. Más mala suerte, ahora para Nokia, perdió otros pocos interesados.
Ah, sí, has leído acertadamente (¿ein?), el software y los mapas se pueden descargar al ordenador para pasarlos al móvil mediante el programa PC Suite de Nokia.
Por supuesto necesitáis Window$, el resto no estáis hechos para dicho manjar.
Sí, más interesados caen por el hueco del ascensor.
Yo ya me harté. Tardé menos en encontrarlo cuando me metí hace semanas en mi móvil en el apartado [menú móvil nokia]->Internet->Descargar. !!Oh, sorpresa¡¡. No, en aquel entonces tardó tanto en descargarse e instalarse que me h***** los c****** y sólo lo probé 2 segundos y luego cayo en el foso de los porsiacaso (o de diógenes, donde acumulas cosas que probablemente no uses jamás)

El sistema se basa en dar una parte del servicio gratuito y otra de pago. Incluso hay parte de los servicios de pago que te dejan probar durante unos 3 días para que te hagas a la idea. Bueno, al menos esto está bien pensado. Quien lo quiera que lo pague.
En esta vida cada uno tiene sus vicios y gasta el dinero en lo que estima oportuno. Unas cosas parecen más sensatas y otras no tanto.
El programa incorpora planificación de rutas, navegación por voz, mapas de más de 150 países, visitas turísticas, restaurantes, hoteles.

Que dicen por ahí

Pues he de confesaros que para realizar este análisis me sugerían (esto sin ironía ni nada) comentar lo que se decía por otros lares y tal ;). Y, sinceramente, el panorama es desolador, todos a los que he leído dicen lo mismo. Si queréis perder el tiempo buscar vosotros mismos por la Internet.

Resumiendo

Como no lo he podido probar bien no puedo dar recomendaciones. Pero supongo que las tres marcas venden hoy por hoy lo mismo.
Nokia Maps es parecido a un TomTom o un Route66, sus competidores.
Yo lo tengo el bote de, cuando me aburra y tenga tiempo, échale un ojo.

Referencias y enlaces
Etiquetas: , , , , , , , , , ,
Te interesará:

“Le mètre cube de sperme” by Philippe Meste


SPERMCUBE, it’s… collecting 1 cubic meter of sperm preserved frozen in a transparent cube. A collective artwork, international, open to all, universal. PARTICIPATE!

If you think you’re prepared, click to read more… (Continuar leyendo…)

Etiquetas: , , , , , , ,
Te interesará:

Google daily traffic patterns


Weeks ago I watch a talk, starring Robert Love and Google and Open Source.
What it was funny was the moment he showed some Google daily traffic patterns. He, as part of the audience, suggested the siesta was maybe responsible of that pattern in Spain.
Well, Spain is now more cosmopolitan and very few people take siesta daily. Although many people take more than one hour at midday meal. I think this is a most real explanation.

Robert Love - Google and Open Source

Robert Love - Google and Open Source

It should have been better comparing U.S.A. and Europe. Don’t you think?

Etiquetas: , , , , ,
Te interesará:

La frase

"La sabiduría viene de escuchar; de hablar, del arrepentimiento."
Proverbio italiano

Álbum

Img0193.png
Álbum Principal
2006-10-07 Imagen010.png

Últimos comentarios


 Página 2 de 56 « 1  2  3  4  5 » sig.  Última »