r9 - 28 Feb 2010 - 16:03:35 - EricTYou are here: Wiki >  AppLogic27 Web > CatGatewayNET2
ALERT! AppLogic 2.7/2.8 Documentation The latest production release is AppLogic 2.8.9

NET2 - Subnet Output Gateway Appliance

Latest version: 1.0.5-1

net.png At a Glance
Catalog System
Category Beta
User volumes no
Min. memory 64 MB
OS Linux
Constraints no
Questions/Comments Ask Forum

Functional overview

ALERT! NET2 is not available in AppLogic 2.8+. Please use NET instead.

NET2 is an output gateway that provides outgoing access to a network outside of an application. NET2 accepts traffic from the application on its in terminal and forwards it through its external interface to the outside network (e.g., the Internet).

NET2 has a firewall that allows only outgoing traffic (connections and datagrams); it drops incoming traffic that is not for an already established connection or related to a datagram request. NET2 can be configured to further limit the set of IP addresses reachable through it.

NET2 serves as a default network gateway and DNS server for the appliance(s) connected to its in terminal.
ALERT! Only gateway output terminals should be connected to NET2's in terminal.

NET2 is used for accessing services outside of an application whose host names are determined at runtime (e.g., mail server addresses obtained from MX DNS records or search engine bots that need to traverse the web).

If the log terminal is connected then NET2 logs via the log terminal to a remote syslog server.

NET2 is implemented using BusyBox to provide a small and efficient environment tailored to support its functionality. It boots from a read-only volume and uses a 2MB ramdisk to store files which change during boot or run time.

ALERT! Please note: the log terminal is not used for storing logs on a mounted cifs file system, but rather for sending logging messages to a remote syslog server. In the future other AppLogic appliances will be updated to log via their log terminals to a remote syslog server.

Boundary

Resources

Resource Minimum Maximum Default
CPU 0.05 4 0.05
Memory 64 MB 2 GB 64 MB
Bandwidth 1 Mbps 2000 Mbps 200 Mbps

Terminals

Name Dir Protocol Description
in in any Accepts all incoming traffic
log out syslog Sends logging messages using the syslog protocol. This terminal may be left unconnected if it is not used.
ALERT! Please note: the log terminal is not used for storing logs on a mounted cifs file system, but rather for sending logging messages to a remote syslog server.
mon out cce Output for performance and resource usage statistics

The external interface is enabled. It is used for outgoing traffic. Its network settings are configured through properties.

The default interface is enabled. It is used for maintenance (incoming ssh connections).

Boot volume

NET2 appliance is based on a custom Linux distribution with a read-only boot volume and inherits its file system layout. Almost all files reside on the boot volume. Files or folders that need to be modified either reside on a RAM drive or are symbolic links to the RAM drive.
ALERT! Any changes applied to an instance of the NET2 appliance will be lost after appliance stop or restart.

User Volumes

None

Properties

Property name Type Description
ip_addr IP Address IP address of the external interface. This property is mandatory.
netmask IP Address Network mask for the network on which ip_addr resides. This property is mandatory.
gateway IP Address IP network gateway (router) used for all outgoing traffic to the external network via ip_addr. If left empty, only hosts on the same subnet as ip_addr/netmask are accessible. Default: empty.
dns1 IP Address IP address of the primary DNS server used for host name resolution. If left empty, NET2 uses the root DNS servers. Default: empty.
dns2 IP Address IP address of the backup DNS server used for host name resolution. If left empty, NET2 does not use a backup DNS server. Default: empty.
allowed_hosts String List of hosts and/or subnets to be accessible through NET2. Separate multiple entries with spaces or commas. Supported format example: 192.168.1.2 192.168.1.0/24 192.168.2.0/255.255.255.0. Default: 0.0.0.0/0 (all allowed)
denied_hosts String List of hosts and/or subnets to which access is denied. The format is the same as for allowed_hosts. Default: empty (none denied)

Error Messages

The following messages may appear in either the appliance log file or the system log of the grid controller when the appliance fails to start:

  • iptables failed to start
  • named service failed to start
  • Failed to set up rules (exit code code); using backup rule set
  • Failed to set up backup rule set (exit code code)

Typical Usage

The following diagram shows a typical usage of NET2 for a simple mail server application that accesses the Internet for mail forwarding using NET2:

net_usage.png

Summary of Parts

  • in - input gateway appliance, class IN
  • web - SMTP server appliance, class WEB5
  • net - output gateway appliance, class NET2

in passes client web requests arriving from outside the application to the web server. web serves static content by itself; for dynamic content, scripts that run in web access some external web sites through the net gateway. The request to external web sites are sent in two steps: first, sending a DNS request for the target server and then sending the request to that server . The net gateway forwards the DNS request from the web server to the specified DNS server and makes the connection to the target server.

The following sections describe the configuration of net in several typical use cases:

Unrestricted access to standard domains

In this mode, NET2 is configured in a way very similar to a regular network gateway (e.g., for connecting a LAN to the Internet via ISP).

Example:

Property name Value Description
ip_addr 192.168.1.12 IP address of the external interface.
netmask 255.255.255.0 Network mask for the external interface.
gateway 192.168.1.1 Gateway for the external interface.
dns1 192.168.1.2 Primary DNS server.
dns2 192.168.2.1 Backup DNS server.

IDEA! Many companies have internal domains that can be resolved only through their private DNS servers (e.g., .local or .localdomain). To use such domains, configure the dns1 and dns2 properties to point to those private DNS servers. Also see the possible hosts restrictions feature below.

Unrestricted access to standard domains using the root DNS servers.

In this mode, NET2 does not need specific DNS servers and uses a set of preconfigured Internet root servers.

Example:

Property name Value Description
ip_addr 192.168.1.12 IP address of the external interface.
netmask 255.255.255.0 Network mask for the external interface.
gateway 192.168.1.1 Gateway for the external interface.

ALERT! In this mode, NET2 needs access to the root DNS servers (otherwise NET2 will fail all DNS queries). The gateway property must be specified.

Restricted access to private domains

In this mode, NET2 is restricted to accessing only specified networks, allowing and denying specific hosts and subnetworks.

Example:

Property name Value Description
ip_addr 192.168.1.12 IP address of the external interface.
netmask 255.255.255.0 Network mask for the external interface.
gateway 192.168.1.1 Gateway for the external interface.
dns1 192.168.1.2 Primary DNS server.
dns2 192.168.2.1 Backup DNS server.
allowed_hosts 192.168.1.0/24 192.168.2.0/24 Allowed subnets.
denied_hosts 192.168.1.4 192.168.2.4 These IP addresses will not be reachable.

ALERT! In this mode, the DNS servers must be within the set of allowed hosts.

Notes

  • In general, the only type of output terminal that should be connected to NET2's in terminal is a gateway output. These outputs differ from regular outputs by acting as "default gateways" for their appliances, allowing connections to multiple hosts (as opposed to the single-host access provided by regular outputs). Gateway outputs are shown visually with a blue square in the terminal shape, while regular outputs are shown with red arrows; see the usage example above.

  • Connecting a regular output to the NET2 gateway will provide only DNS resolutions. This is a valid use of the NET2 gateway (essentially as a DNS resolution service).

  • If a host is present, directly or as part of a subnet, both in the allowed_hosts and in the denied_hosts lists, NET2 will deny access to that host. NET2 first rejects all denied hosts and then allows only those in allowed hosts (standard security practice).

  • If your application doesn't need access to a whole network but to a particular host (e.g., ftp.3tera.com), it is better to use the OUT2 gateway appliance.

  • NET2 is not used for providing incoming requests to an application. Incoming request can be handled using the IN2 gateway appliance.

Open source and 3rd party software used inside of the appliance

NET2 use the following open source and 3rd party packages in addition to its base install of Busybox OS.

Software Version Modified License Notes
busybox 1.13.4 No GPLv2 homepage
openssh 5.2p1 No BSD homepage
bind 9.3.4-10.P1 No ISC license downloads page
bind-libs 9.3.4-10.P1 No ISC license downloads page
bash 3.1-16.1 No GPLv2 N/A
coreutils 5.97-12.1.el5 No GPLv2 N/A
curl 7.15.5-2.1.el5_3.5 No MIT N/A
dbus-libs 1.1.2-12 No GPLv2 N/A
dhclient 3.0.5-7.el5 No ISC license N/A
e2fsprogs-libs 1.39-8.el5 No GPLv2 N/A
glibc 2.5-12.2 No LGPLv2.1 N/A
grep 2.5.1-54.2.el5 No GPLv2 N/A
initscripts 8.45.14.EL-1.el5.centos.1 No GPLv2 N/A
iproute 2.6.18-4.el5 No GPLv2 N/A
iptables 1.3.5-1.2.1 No GPLv2 N/A
iputils 20020927-43.el5 No BSD N/A
krb5-libs 1.5-23 No MIT N/A
libcap 1.10-26 No BSD or GPLv2 N/A
libidn 0.6.5-1.1 No LGPLv2.1 N/A
libtermcap 2.0.8-46.1 No LGPLv2.1 N/A
mingetty 1.07-5.2.2 No GPLv2 N/A
module-init-tools 3.3-0.pre3.1.16.el5 No GPLv2 N/A
openssl 0.9.8b-8.3.el5 No BSD N/A
pcre 6.6-1.1 No BSD N/A
perl 5.8.8-10 No Artistic N/A
procps 3.2.7-8.1.el5 No GPLv2 N/A
strace 4.5.15-1.el5 No BSD N/A
SysVinit 2.86-14 No GPLv2 N/A
tcpdump 3.9.4-11.el5 No BSD N/A
wget 1.10.2-7.el5 No GPLv2 N/A
zlib 1.2.3-3 No zlib N/A

To see the full list of open source packages used in this appliance, please see its implementation design.

Related Documents

Questions and Comments

IDEA! To post a question or comment on this appliance, visit our forum.


-- Main.AndriyMayevskyy - 27 Jul 2009

 
Copyright © 2005-2010 3tera, Inc. All Rights Reserved.
%