Configuring 2 Ubuntu VM (networking)
Hi,
I have latest ubuntu and I have made 3 vm's for them. VM 1: with 2 NIC cards, one is NAT connected directly through my host machine to the internet with ip address 192.168.190.142. Second NIC card is "host only" with ip address 192.168.0.10 VM 2: with 1 NIC card, "host only" and ip address 192.168.0.100 I want VM 2 to connect to the internet but through VM 1. for this I used following configuration in Code:
/etc/network/interfaces Code:
auto lo P.S: both machines are pinging each other properly. |
When we read your question we are completely clueless as what you are asking
1) You are using Xen,KVM or which type of hypervisor ? 2) When you say VM1 I think you mean to say the real operating system which is host for the guests is it correct? 3) Can you describe some thing about your network topology bridged,NAT, Code:
|--------------192.168.0.100 4) Quote:
5) Are you saying the host Operating System also as VM or only guest OS? |
Okay, I might have put the question in a wrong way.
- I have 1 physical machine which is running Windows 7 64 Bit. - I have installed VMWare on it. - I have created 2 VM (Virtual Machines). VM 1 (Ubuntu 10.04) and VM 2 (Ubuntu 10.04) Code:
- 2 Machines (VM 1 and VM 2) are able to ping each other i.e. Code:
ping 192.168.0.10 Code:
ping 192.168.0.100 I want my VM 2 to access internet through VM 1. I hope i am clear this time |
Quote:
Google Squid. |
emm .. are you sure? it should not be that complex thing .. :s
|
okay let me put this way. I don't want to set up a proxy server. I want to share the connection which is being used by VM1.
|
From VM1 run these commands:
Code:
sudo bash -c 'echo "1" > /proc/sys/net/ipv4/ip_forward' |
i did the ipforward thingy but have not tested the iptables. will test it .. thanks though
|
You will also need to set VM1 as the default gateway for VM2
|
All times are GMT -5. The time now is 11:55 AM. |