Difference between revisions of "Ubuntu Virtual Servers"

From VistApedia
Jump to: navigation, search
(Using virtual hosts for the Ubuntu server)
(Added a glossary link to Configuration~)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
The idea is to use a URL (such as ''www.exampledomain.org'' or ''vistaserver1.exampledomain.org'') for your site (that is registered on an Internet [http://en.wikipedia.org/wiki/Domain_Name_System DNS] (Domain Name Server)) to access the VistA server, instead of using the actual IP address of the server. Most configurations involve a LAN, and usually the registered URL will point not to the (LAN) IP address of the VistA server itself (within the LAN), but to the (WAN, or Internet) IP address of the '''router'''. Therefore, communications arriving at the '''router''' must be forwarded from the router (connected to the Internet) to the server (within the LAN) properly.
+
The idea is to use a URL (such as ''www.exampledomain.org'' or ''vistaserver1.exampledomain.org'') for your site (that is registered on an Internet [http://en.wikipedia.org/wiki/Domain_Name_System DNS] (Domain Name Server)) to access the VistA server, instead of using the actual IP address of the server. Most [[configuration~|Configuration]]s involve a LAN, and usually the registered URL will not point to the (LAN) IP address of the VistA server itself (within the LAN), but to the (WAN, or Internet) IP address of the '''router''' for the LAN. Therefore, communications arriving at the '''router''' must be forwarded from the router (connected to the Internet) to the VistA server (within the LAN) properly.
  
 
=== NAT ===
 
=== NAT ===
 
Consumer-grade routers generally use [http://en.wikipedia.org/wiki/Network_address_translation NAT] port-forwarding to send traffic that arrives at the router to a specific server within the LAN (such as the one hosting the VistA server). Certain types of traffic can be designated as flowing over "ports" and (in the simplest scenario) a specific server can be designated as the destination on the LAN to which all the traffic over a specific port will be sent.  
 
Consumer-grade routers generally use [http://en.wikipedia.org/wiki/Network_address_translation NAT] port-forwarding to send traffic that arrives at the router to a specific server within the LAN (such as the one hosting the VistA server). Certain types of traffic can be designated as flowing over "ports" and (in the simplest scenario) a specific server can be designated as the destination on the LAN to which all the traffic over a specific port will be sent.  
  
Your router's configuration utility (often accessible from a web browser) allows you to configure "NAT port forwarding" so that traffic arriving at a certain port (such as port 22) will be "forwarded" to a specific server on the LAN (which will have its own unique IP address within the LAN).
+
Your router's [[configuration~|Configuration]] utility (often accessible from a web browser) allows you to configure "NAT port forwarding" so that traffic arriving at a certain port (such as port 22) will be "forwarded" to a specific server on the LAN (which will have its own unique IP address within the LAN).
  
 
With Astronaut, all communications are sent through a secure [http://en.wikipedia.org/wiki/Secure_Shell SSH] tunnel. By convention, SSH communications are usually sent on port 22 (but that [[Changing_the_Astronaut_SSH_port|can be changed]]). If you only have one SSH server on your LAN, using port 22 will be fine. However, if there is more than one SSH server on your LAN, or if you want a modicum of greater security, then a [[Changing_the_Astronaut_SSH_port|different port can be used for SSH]] for each host.)
 
With Astronaut, all communications are sent through a secure [http://en.wikipedia.org/wiki/Secure_Shell SSH] tunnel. By convention, SSH communications are usually sent on port 22 (but that [[Changing_the_Astronaut_SSH_port|can be changed]]). If you only have one SSH server on your LAN, using port 22 will be fine. However, if there is more than one SSH server on your LAN, or if you want a modicum of greater security, then a [[Changing_the_Astronaut_SSH_port|different port can be used for SSH]] for each host.)
Line 13: Line 13:
 
Unlike Apache, OpenSSH does not allow true virtual hosts.
 
Unlike Apache, OpenSSH does not allow true virtual hosts.
 
    
 
    
However, most large networks will often have more than one server listening for SSH connections. In general, I recommend merely [[Changing_the_Astronaut_SSH_port|changing the SSH port]] number for the VistA server and forwarding that port to the VistA server. Then the configuration is simple. The URL used for SSH remains the same URL that is used for the entire LAN. Only the port changes.
+
However, most large networks will often have more than one server listening for SSH connections. In general, I recommend merely [[Changing_the_Astronaut_SSH_port|changing the SSH port]] number for the VistA server and forwarding that specific port to the VistA server. Then the [[configuration~|Configuration]] is simple. The URL used for SSH remains the same URL that is used for the entire LAN. Only the port changes.
  
If you have multiple SSH hosts on your network (e.g. for multiple VistA servers), then each SSH host will need to have a unique port.
+
To reiterate, if you have multiple SSH hosts on your network (e.g. for multiple VistA servers), then each SSH host will need to have a unique port.
  
 
Each host will need to have its unique SSH port specified in the sshd-config file found in the /etc/ssh folder on that host. The router will have the job of forwarding each port appropriately.
 
Each host will need to have its unique SSH port specified in the sshd-config file found in the /etc/ssh folder on that host. The router will have the job of forwarding each port appropriately.
Line 28: Line 28:
  
 
=== Edit the Ubuntu Server Apache2 virtual hosts file ===  
 
=== Edit the Ubuntu Server Apache2 virtual hosts file ===  
*Copy and edit a configuration file in the Apache2 sites-available folder.
+
*Copy and edit a [[configuration~|Configuration]] file in the Apache2 sites-available folder.
 
  cd /etc/apache2/sites-available
 
  cd /etc/apache2/sites-available
 
  sudo cp default vistaserver1
 
  sudo cp default vistaserver1

Latest revision as of 19:32, 17 December 2012

The idea is to use a URL (such as www.exampledomain.org or vistaserver1.exampledomain.org) for your site (that is registered on an Internet DNS (Domain Name Server)) to access the VistA server, instead of using the actual IP address of the server. Most Configurations involve a LAN, and usually the registered URL will not point to the (LAN) IP address of the VistA server itself (within the LAN), but to the (WAN, or Internet) IP address of the router for the LAN. Therefore, communications arriving at the router must be forwarded from the router (connected to the Internet) to the VistA server (within the LAN) properly.

NAT

Consumer-grade routers generally use NAT port-forwarding to send traffic that arrives at the router to a specific server within the LAN (such as the one hosting the VistA server). Certain types of traffic can be designated as flowing over "ports" and (in the simplest scenario) a specific server can be designated as the destination on the LAN to which all the traffic over a specific port will be sent.

Your router's Configuration utility (often accessible from a web browser) allows you to configure "NAT port forwarding" so that traffic arriving at a certain port (such as port 22) will be "forwarded" to a specific server on the LAN (which will have its own unique IP address within the LAN).

With Astronaut, all communications are sent through a secure SSH tunnel. By convention, SSH communications are usually sent on port 22 (but that can be changed). If you only have one SSH server on your LAN, using port 22 will be fine. However, if there is more than one SSH server on your LAN, or if you want a modicum of greater security, then a different port can be used for SSH for each host.)

Make sure the firewall (if any) on the Ubuntu Server OS (in which the VistA server is installed) does not block port 22 (or whichever port you have decided to use for SSH traffic)!

Using virtual hosts for the Ubuntu server

Unlike Apache, OpenSSH does not allow true virtual hosts.

However, most large networks will often have more than one server listening for SSH connections. In general, I recommend merely changing the SSH port number for the VistA server and forwarding that specific port to the VistA server. Then the Configuration is simple. The URL used for SSH remains the same URL that is used for the entire LAN. Only the port changes.

To reiterate, if you have multiple SSH hosts on your network (e.g. for multiple VistA servers), then each SSH host will need to have a unique port.

Each host will need to have its unique SSH port specified in the sshd-config file found in the /etc/ssh folder on that host. The router will have the job of forwarding each port appropriately.