LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-26-2007, 10:34 PM   #1
ElectroLinux
Member
 
Registered: Feb 2004
Posts: 74

Rep: Reputation: 15
Can I share a virtual network using vmware server on two different hosts


Can I share a virtual network using vmware server on two different hosts?

Host1 10.31.53.22
-VM1 192.168.1.10

Host2 10.31.53.23
-VM2 192.168.1.11

I want VM1 and VM2 to be able to ssh to each other and talk to each other.

Is this possible with vmware server (free)? I know esx can do it, but i didn't want to use esx (not free).
 
Old 07-26-2007, 11:03 PM   #2
binary_pearl
Member
 
Registered: Jul 2007
Location: Chicago Illinois
Distribution: SLES 10 SP2/SP3, SLES 11 SP1, OpenSUSE, Sabayon, Gentoo, Fedora 14, RHEL 3/4/5/6
Posts: 98
Blog Entries: 3

Rep: Reputation: 23
I think this would work:

Host2: ssh VM1_user@10.31.53.22
and
Host1: ssh VM2_user@10.31.53.23

The main thing that I could think of that would prevent this from working is if either Host has a firewall up blocking port 22 or if your router(s) are blocking port 22.

--Shaun
 
Old 07-26-2007, 11:13 PM   #3
ElectroLinux
Member
 
Registered: Feb 2004
Posts: 74

Original Poster
Rep: Reputation: 15
Actually, i wanted to keep the VMs on a different isolated network. So, ssh should only be possible if you are on the 192.168.1.XXX network.
 
Old 07-28-2007, 11:21 PM   #4
binary_pearl
Member
 
Registered: Jul 2007
Location: Chicago Illinois
Distribution: SLES 10 SP2/SP3, SLES 11 SP1, OpenSUSE, Sabayon, Gentoo, Fedora 14, RHEL 3/4/5/6
Posts: 98
Blog Entries: 3

Rep: Reputation: 23
I'm not sure if this would work, but could you modify your /etc/hosts file to have each computer only be able to access each other? Another possible but complicated idea would be to route the connection between the two private computers through NAT. For example, VM1 and VM2 would both send all of their packets though a random port, maybe 60000. If you wanted to try this, iptables is the command that you would want to look at.

--Shaun
 
Old 07-29-2007, 02:44 AM   #5
ElectroLinux
Member
 
Registered: Feb 2004
Posts: 74

Original Poster
Rep: Reputation: 15
Well, i was thinking of using the second NIC on the system to have a separate subnet. So eth0 would have my regular physical systems on it. Eth1 would have my VM network, though i'm not sure how to isolated the two networks would be from each other. Can the VM ONLY use eth1? i think so. Does anyone know how to configure the /dev/vmnet8 interface? Would I need to just config the eth1 interface?
 
Old 07-29-2007, 11:07 PM   #6
binary_pearl
Member
 
Registered: Jul 2007
Location: Chicago Illinois
Distribution: SLES 10 SP2/SP3, SLES 11 SP1, OpenSUSE, Sabayon, Gentoo, Fedora 14, RHEL 3/4/5/6
Posts: 98
Blog Entries: 3

Rep: Reputation: 23
I think what you are saying will work how you want it to. How does this setup sound?

Host1:
eth0 10.31.53.22
eth1 192.168.1.10

Host2:
eth0:0 10.31.53.23
eth0:1 192.168.1.11

You can set multiple ip addresses on a single network card. They are distinguished by eth0:0 eth0:1 ...etc. You can set this through the command:
iptables eth0:1 192.168.10.11

You might then need a route to connect the 192 ips. I'm not 100% sure. If you get this far, try pinging them and see what happens

--Shaun
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up a virtual network (vmware)? kornerr Slackware 4 10-26-2007 01:05 PM
apache virtual hosts: how do I view them on local network? wendallsan Linux - Software 2 01-16-2005 11:57 PM
why the virtual network of my vmware can not work icoming Linux - Software 4 12-05-2004 09:24 PM
Virtual Hosts using a BNC on a IRC Server Hackiller Linux - General 3 09-16-2003 10:05 AM
Virtual Hosts in Apache Server irclord Linux - Networking 5 09-02-2003 01:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration