Moving a VirtualBox .vdi Linux machine to a new host computer - linux

I've been happily using an Ubuntu 12.04 VM as a webserver with a static IP running on VirtualBox on my Windows 7 machine for a few months (working on it from the host computer, bridged network connection, accessing via SSH from host and sharing folders through windows).
In /etc/network/interfaces, I've got:
address 192.168.1.112
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 194.168.4.100 194.168.8.100
I tried creating a new VM with it on my Win7 laptop by copying across the .vdi and creating a new VirtualBox machine with it, then changing the static IP to 192.168.1.116, but I'm not getting any network... It can't ping anything, when I try to SSH into the VM, it says "connection rejected" and it doesn't show up anywhere in my Windows network.
Can anyone shed any light?

"Perryg" on the VirtualBox forums solved it:
Edit the /etc/udev/rules.d/70-persistent-net.rules, or you can delete the rules and Linux will configure it on the next boot.
That's all there was to it.

Related

VirtualBox: Host can not SSH to Guest

i'm having some issue with m VirtualBox installation, 6.1.22.
I have a VM with SUSE (SL12P1) for 64bit as a guest operative system, I have already installed the extension package and I'm trying to reach the guest from the host-system (Windows10) using ssh.
I have set the network adapter as "Bridge", in this way the guest has a 192.168.120.x IP, which i verified with ifconfig while the host has an IP of 192.168.120.y.
I can ping the guest from the host, but I cannot ssh the guest from the host system.
Notice that:
The firewall has been disabled
I have enabled Hyper-V virtualization.
I have tried setting the network adapter as NAT, and use port forwarding, but the ssh does not work either
The firewall for SuSE was active by default, after disabling it everything worked.

How to install whm,cPanel in my laptop?

I want to install whm & cpanel in my laptop. I install centOs 6.4 using oracle virtualBox as per instruction/iso in http://www.comunidadhosting.com/t/tutorial-de-como-instalar-cpanel-en-localhost.18879/.
After install it i check IP and it show me 10.0.2.15 . but my main problem is I am not able ping to guest machine from my host. When I ping from my guest to host machine then it's working fine , and host get internet access also.
I use NAT in networking.
Can any body tell me what is the problem and how to solve it ?
You need to check if you have a bridged connection OR a NAT connection with the outside host network. Both should have the same network connection and IP may be same/different.
And, if you have done this, then you need to disable the firewall on the guest-machine side so that your host machine could connect to the VM.
Your ping may then be failing because of getting blocked by the VM's firewall.

Using tor over ssh on virtual network

I have two Machines running in VirtualBox, Ubuntu 12.04 LTS with two network adapters (NAT,Internal Network) and Kali Linux with one adapter (Internal Network). I'm also running tor ( SocksPort 9150, ControlPort 9151 ) in Ubuntu. My goal is to have access on the internet from Kali only through tor. So I used ssh port forwarding from kali to ubuntu and also configured firefox to use proxy( 127.0.0.1 - 9150)
kali~# ssh -N -L 9150:10.0.3.2:9150 root#10.0.3.1
With this command i am trying to forward all the traffic into tor.
The connection is established according to netstat and ping is working but when i try to load a page nothing happens and i keep getting the same error message on Kali's terminal
channel 2: open failed : connect failed : connection refused
Am i missing something? Do i need to open a port?
I also tried to use a SOCKS proxy with
ssh -D 9150 root#10.0.3.1
but it didn't work. Please share your thoughts with me, I am waiting for your insights.Thank you.
Internal Network Configuration:
Ubuntu:
IP:10.0.3.1
Broadcast Address:10.0.3.255
Subnet Mask:255.255.255.0
Default Route:10.0.2.2
Primary DNS:192.168.1.1
Kali:
IP:10.0.3.2
Broadcast Address:10.0.3.255
Subnet Mask:255.255.255.0
NAT Configuration:
Ubuntu
IP:10.0.2.15
Broadcast Address:10.0.2.255
Subnet Mask:255.255.255.0
Default Route:10.0.2.2
Primary DNS:192.168.1.1

Cannot access ubuntu server from other machines other than the machine which is hosting the virtual machine which is my ubuntu server

I created a ubuntu server on vmware. I am using it as a file server. I can access it if I am connecting through the machine which hosts the virtual machine. I am not able to do it from other machines which are on the same network. Thanks in advance!
First of all make sure in the setting of the virtual machine that it is in Bridged Adaptor type connectivity.
Give a static ip to the virtual machine using
sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0
the above is an example. You got what I mean.
3.Third, Try pinging the virtual machine with the base machine running the vbox to make sure they are connected.
ping ipaddress-basemachine
4 . Now if everything is working fine from there then connect with this virtual machine with other base machine using Remote Desktop Viewer or any other similar application.
Specify, the ip-address of the vbox and username, password. It will be able to connect with it now.
5 . If it still is not able to then try to check the firewall rules on both the virtual box machine and the base machine running the vbox using the command
iptables -L

DNSclient is not picking up hostname from DNSserver but it is able to ping it

I Have Window 7 as Host Machine and I have installed Redhat 5.3 and Centos 5.4 as Vmware Machines under Window 7 through Vmware Workestation.I configure DNS & DHCP in Redhat 5.3(10.0.0.1) and able to do nslookup & DIG in this.I am able to ping window 7,redhat,centos with each other.
I have made one entry client30.example.com for ip 10.0.0.30 in forword and backword lookup file in DNS server(10.0.0.1).
Problem :-
Centos whom i have made dhcp client of Redhat(10.0.0.1) is able to get ip from dhcp server and it gets ip 10.0.0.30 (as i wanted no problem till now)
But Centos is not picking up hostanme client30.example.com as i have bind entry of ip 10.0.0.30 with client30.example.com.
Still it is picking up hostname localhost.localdomain. I check /etc/resolve.conf file of centos and i found that by default it picks nameserver 192.168.1.1(even i have not provided this ip anywhere).Everytime i made manual change in this ip again it pics same ip on reboot.
Kindly help how i can resolve this problem.
Because VMware Workstation is itself DHCP. Please disable DHCP in VMware Workstation, You can't run two DHCP in single network subnet.
Also check /etc/sysconfig/network file, Hostname coming from there.

Resources