host only networking for "Crunchbang host" "Arch Linux guest"
I have a “Crunchbang 10“ (Statler) installed as the host, and Arch linux installed in Virtualbox 4.0.6. My goal is to be able to ssh into the the guest from the host. I tried to follow this post http://muffinresearch.co.uk/archives...-linux-guests/
but it is somewhat sketchy.
My questions are as follows:
What changes, if any, are to made to the host’s network configuration, in this case /etc/network/interfaces? What verbiage is to be used?
What changes are to be made to the guest’s network interface, in this case /etc/rc.conf? What verbiage is to be used?
Does one access the host from the guest, and if so, how, host name and ip address of the host?
If one wishes to access the guest from the host, how does one do that?
Is it ssh guest hostname + ip address of the guest?
In short, can someone explain what the author of the post was trying to communicate? I Googled many posts over a period of hours, but they are all incomplete, written for very advanced users and pale besides something like the Arch Linux beginner’s guide, pindarsign.de and most of the Ubuntu’s documentation, hence my problem. Arch Linux on an encrypted LVM jfs is my main system, so respondents, know that your time will not be wasted.
Clarification would be greatly appreciated :)
if you use -> settings -> network -> NAT (the default, btw).
if you got a router use -> settings -> network -> bridged and use `ifconfig` to find out the IP number (which will be assigned by the router). Same command: ssh user@IP.
Other ways to do it i don't know, though there are. Both ways are easy, no need to configure anything.
The extra voodoo to set up Arch in /etc/rc.conf is beyond me. In Debian there is no further configuration required ( might be for Arch too, no clue)
I'm not familiar with the distros you are using but the general principle outlined in my post are to use 2 interfaces for networking on your guest.
1. NAT provides outbound internet access.
2. Host Only network provides a way to communicate between the guest and the host.
You could simply use bridged networking which uses the interface of the host to connect to the network, but given I want my set-up to be rock-solid for travel (This was written with a laptop in mind) I use the two network adaptors approach outlined above so there's no issue when disconnecting from networks and working without being on a network.
Vboxnet0 is set-up by Virtualbox itself - if it isn't visible when running /sbin/ifconfig on the host then check "File -> Preference -> Network" in the VirtualBox Manager. Ensure that DHCP is enabled (worth doing in-case that's how you want to use it).
On the guest all you need to do is configure the 2nd adapter, the first should be automatic, and the 2nd might be too depending on what OS or version of OS you're using.
In the case of the article (I was using JEOS - basically a minimal Ubuntu Server install so I needed to set-up eth1 in /etc/network/interfaces and in the post I detail this using a static address. That said there would be nothing stopping you using DHCP to have an IP address automatically assigned.
Hope this helps to point you in the right direction to get you up and running. Let me know if not!
Perhaps this description of my understaning of the problem will help :)
Thank you J1alu & muffinresearch for replying. Who would think that the author of an article would reply to my host? I am flattered.
What I would like to do is provide you with an overview of my understanding of the whole ssh between VirtualBox guest (VBG) & the host. Perhaps you can correct my understanding of what is supposed to happen.
1) With the VBG off, setup up a host only adaptor.
2) Find the DHCP of the host or create a static ip address on the host as eth1.
3) Start the VBG.
4) From within the VBG, /sbin/ifconfig vboxnet0 up. Note: this command varies from distro to distro.
5) On the crunchbang host create eth1 from vboxnet0. Note: Crunchbang = Minimalist Ubuntu.
6) Ping the host, from the VBG, which will be blocked by the firewall.
7) Ping the VBG from the host. The VBG will respond.
This next part is difficult.
From the guest, is it ssh firstname.lastname@example.org.X of the host? Or is it ssh email@example.com of the host?
Also, the host rejects vboxnet0 as a valid ethernet device, so should it be dubbed eth1?
As you can see I am lost. However, I have potential. I can manually setup LVM and multiple partitioned flash drives containing multiple bootable kernels with Grub Legacy as the bootloader and custom splash images. Not guru stuff but not too shabby either, so I know I can do this but not without help. Again, thanks for responding so fast. I hope the above can help you to help me while minimizing your loss of time.
I've found that I do best when things articles are written with the goal listed first, followed by an overview of the major steps to be taken. After that if each of the major steps becomes a detailed and enumerated series of steps. That is the type of writing that serves me best. I say that not to criticize, but it's works so well for Ubuntu, Arch and a few others. Writing is hard work. However, I feel that constructive criticism that has the potential to benefit the Linux community is always warranted where applicable.
|All times are GMT -5. The time now is 05:43 PM.|