TurnKey Linux Virtual Appliance Library

Access to virtual server from outside local network

Dear,

I have been using several Turnkey Virtual Appliances (mainly Drupal and PostgreSQL) for some time now. Great stuff! Thanks, thanks and thanks again.

Now I have a problem though and I was hoping someone could help me out. Let me start with describing the current situation.

I have a Drupal running on my PC. So from a browser on my PC I can access it with eg http://192.168.0.182 and that works great.

My PC is on my little home network. Basically my broadband internet connection first goes to an (old) PC running Smoothwall (=firewall). From my firewall machine it goes to a 16 port router. On that router several machines are connected: my personal PC, my wife's laptop, my Pinnacle Soundbridge music streamer, two NAS devices, the kids' PC, and so on.

My personal PC has received 192.168.0.200 as internal ip address from the DHCP server running on the firewall machine. Of course the firewall machine also has an "outside" ip address which it receives from my ISP. Theoretically this is a dynamic ip address, but in practice it hasn't changed during the last couple of years. Let's say this ip address is 85.218.43.11 (it's not this one of course).

What I want to do now is access my Drupal server (192.168.0.182) from a computer somewhere on the internet (eg my work). How can I do that? Note that doing this won't be permanent. It's just for testing purposes. I also do realise that both my personal PC and the Drupal virtual appliance will need to be running when I want to connect.

Can anyone help me out please? Please consider that I don't know much about networking but am willing to learn. Being a professional programmer I do know how to master a pc and I'm not afraid to fiddle around.

Thanks!

Alon Swartz's picture

NAT and DDNS?

Take a look at the NAT (Network Address Translation) and DDNS (Dynamic DNS) documentation. They are not exactly what you are looking for, but should be close enough to your setup to get going.

You should be able to setup NAT on your firewall instead of the described router in the NAT documentation. Also, DDNS is optional if you don't mind accessing the legal IP address directly considering it doesn't change.

Let us know how it goes. Good luck!

Thanks for the response

Thanks for the response Alon.

I also posted my question on the Smoothwall forum (community.smoothwall.org/forum/viewtopic.php) and got it fixed there.

Basically what I needed to do was setting up a port forwarding rule on the firewall. The rule forwards an incoming https call from my works ip address on port 443 to the ip address of the Drupal virtual appliance on port 80 or 443. And that's it.

As I'm only using this setup for some tests, I can do with the legal IP address and don't need DDNS.

how to setup smoothwall

Hi Bart,

 

Just want to know how you set up entire smoothwall on your old PC?

 

Regards:

Ravi

It's an old IBM machine. I

It's an old IBM machine. I just installed SmoothWall as it comes. Not much special settings. Only some port-forwardings like the one above.

What exactly do you want to know? Anyway, SmoothWall questions should be asked on their forum!

Hi Bart, Thanks for the

Hi Bart,

Thanks for the info.

What Exactli want is something similar to your environment. Like my host machine will be using windows XP or Windows 7 and I'll be creating 2 virtual machines on this host machine with guest OS being Linux. Now these 2 guest machines will serve as oracle RAC environment. And I want to access these machines over the internet.

 

Keep in mind that Smoothwall

Keep in mind that Smoothwall needs a machine for its own. You can't install anything else on it. We'll call this one PC1.

Also keep in mind that your 2 virtual machines will only be available when your physical host machine is running. You might not want to do that with your "day-to-day desktop computer". This is more like something for a seperate server machine. We'll call it PC2.

For management of PC1 and PC2 you can use your desktop/laptap machine. We'll call this one PC3.

Install Smoothwall on PC1

Install your 2 virtual machines on PC2

Run each of your virtual machines. If you use Turnkey appliances you will get the ip address and the port number for connection to each machine in a nice popup. eg 10.100.50.6/1234 and 10.100.50.7/2345

From PC3 you can now connect to your oracle machines using the given addresses.

From the outside world (internet) you can't as these ip addresses are internal.

So with the management tool of Smoothwall you can make a port-forwarding. Basically you tell your smoothwall machine to forward all inbound traffic on a port of your choice (within limits of course) eg port 33669 to the internal ip address 10.100.50.6 port 1234 and inbound traffic on eg port 44775 to ip 10.100.50.7 port 2345

That's it. Now you should be able to connect to oracle from the outside world.

My oracle knowledge is a bit rusty, but I think it should be something like

DEV01  =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = your.external.ip)(PORT = 33669))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DEV01)
    )
  )


Or with TNS Easy Connect sqlplus scott/tiger@your.external.ip:33669/DEV01

Hi Bart, Thanks for the

Hi Bart,

Thanks for the nice explanation. I do not know what is Turnkey appliance and how it will be used in my kind of set up?

Regards:

Ravi

Then you should urgently take

Then you should urgently take a look at the url of the forum you're on (that would be http://www.turnkeylinux.org/forum/support/20100214/access-virtual-server...) and than go to their home page and start reading.

Good luck!

Liraz Siri's picture

Face in palm

People are so used to just googling for stuff sometimes they don't notice where it takes them. :)

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)