LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 12-01-2009, 12:32 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
How to make remote desktop browse VM


Hi folks,


KVM - virtualization software
SugarCRM
host OS - Debian 5.0
VMs (guest) OS - Ubutun 9.04
Single(one) external IP


This is an experiment.

There are 4 VMs, each running SugarCRM which is a web-base CRM. Each VM has its own host name and internal IP. Desktops on local network(Intranet) can browse each VM on;
Code:
local_ip/sugarcrm
without problem.

Now my further test is how can remote-desktops connect/browse the VMs? Because there is only ONE external IP. Suggestion and pointer would be appreciated. TIA

B.R.
satimis
 
Old 12-01-2009, 03:38 AM   #2
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
I think that by using iptables DNAT on the debian host you should resolve the problem
for example:

external client ---ext IP:8000 (iptables DNAT)---internal clienta:80
external client ---ext IP:8001 (iptables DNAT)---internal clientb:80
external client ---ext IP:8002 (iptables DNAT)---internal clientc:80
external client ---ext IP:8003 (iptables DNAT)---internal clientd:80

a dnat rule looks like this:
iptables -t nat -A PREROUTING -i eth2 -p tcp -m tcp --dport 8000 -j DNAT --to-destination 192.168.0.210:80

where eth2 is the external interface configured with the external IP
192.168.0.210 could by the IP of one of your SugarCRM hosts

Last edited by ddaemonunics; 12-01-2009 at 03:43 AM.
 
Old 12-01-2009, 09:18 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by ddaemonunics View Post
I think that by using iptables DNAT on the debian host you should resolve the problem
for example:

external client ---ext IP:8000 (iptables DNAT)---internal clienta:80
external client ---ext IP:8001 (iptables DNAT)---internal clientb:80
external client ---ext IP:8002 (iptables DNAT)---internal clientc:80
external client ---ext IP:8003 (iptables DNAT)---internal clientd:80

a dnat rule looks like this:
iptables -t nat -A PREROUTING -i eth2 -p tcp -m tcp --dport 8000 -j DNAT --to-destination 192.168.0.210:80

where eth2 is the external interface configured with the external IP
192.168.0.210 could by the IP of one of your SugarCRM hosts
Hi ddaemonunics,

Thanks for your advice.

Could you please explain in more detail? Which config file of iptables I have to edit?

The ethernet card connected to external IP is eth0.

Intranet IP
Code:
 
host 192.168.0.100
VM1  192.168.0.101
VM2  192.168.0.102
etc.
TIA

B.R.
satimis
 
Old 12-01-2009, 11:39 AM   #4
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
debian doesn't have a default iptables file to edit...you have to make one, put your iptables commands in this file and the put the file in /etc/init.d/ chmod +x it and then enable it for the runlevels you need.
The command from my first post is self explanatory ..I think...but if not please take a look here http://linux-ip.net/html/nat-dnat.html
it does explain everything you need to know to solve your problem
also this http://www.frozentux.net/iptables-tu...tml/x4033.html for more theory on dnat with iptables

Last edited by ddaemonunics; 12-01-2009 at 11:43 AM.
 
  


Reply



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
3 local IPs, one remote proxy server to browse internet! omidm Linux - Wireless Networking 17 12-09-2008 03:03 PM
Scripting Remote Logon - Starting Remote Gnome Desktop klmukp Linux - Newbie 1 09-21-2008 12:13 AM
How to make windows remote desktop from RHEL 4&5. haariseshu Red Hat 3 05-28-2008 01:18 PM
how to make remote login and remote installation via libssh vdx Programming 5 09-10-2007 10:23 PM
How to make clients browse the internet Gorchi Linux - Networking 0 03-13-2003 06:12 AM

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

All times are GMT -5. The time now is 04:20 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
Open Source Consulting | Domain Registration