About Internet Services
This section covers the files and entries created by the SETUP
program to handle requests for services.
The form, location, purpose, and contents of the files and entries is explained; how to create them is not, as that is the properly the task of SETUP
.
The specific items covered are:
leasepakd
service request
The leasepakd service is an Internet service available on certain exposed TCP ports of the application host.
The leasepakd service requires entries in two locations:
- /etc/services requires a single-line entry
-
(x)inetd configuration
-
HP-UX & Solaris – the file /etc/inetd.conf
requires a single-line entry
-
Linux – a file named with the service name is
required in the /etc/xinetd.d directory
These entries are created using the following values from SETUP:
-
$leasepak_version – the LeasePak release version
-
$LEASEPAKD_PORT – the port to use for leasepakd
-
$LPKDPORT_INSTYPE – whether to install new entries or to
replace them
-
$LPKDPORT_TO_REPL – if replacing a port, which one
-
$SYSINSTALLFLAGS – position 5:
Y = install nst_lp76a${INST_ID}_7600
N = do not install nst_lp76a${INST_ID}_7600
-
$LPKD_SVC_ID – the service ID being installed for leasepakd, of the form nst_lp76a${INST_ID}_7600.
leasepakd service request - entry #1
/etc/services
:
nst_lp76a${INST_ID}_7600 7600/tcp # ${INST_ID_CMT} LeasePak v76a leasepakd /opt/nst/v76a
where:
-
nst_lp76a${INST_ID}_7600
– the service name or service ID. When a potential client desires this service, it searches for the service ID in order to obtain the port
-
7600/tcp – the port and protocol should be unique within
/etc/services
as should the service ID
. The port and protocol tell the potential client where (port) and how (protocol) to obtain this service on this host.
-
# ${INST_ID_CMT} LeasePak v76a leasepakd /opt/nst/v76a
– a comment that details which LeasePak release version is connected to this entry, and where that LeasePak instance is located.
The port number is more or less arbitrary. It is prompted for during SETUP
with the prompt TCP port assignment for leasepakd inet daemon [7600]:. The administrator should accept the default, 7600
, unless he or she knows that this will create conflicts. The number entered must be more than 1023 and less than 65536. The port is available to all LeasePak-configured processes through the environment variable $LEASEPAKD_PORT
.
That being said, there is a relationship between the port number chosen and the LeasePak release version. Briefly, ports 6400, 6500, and 6600, relate precisely to LeasePak versions v64a, v65a and v66a. If the administrator needs to assign different numbers, it may be useful to find a way to fit into the pattern. The mPowerd service, discussed below, uses by default the leasepakd port plus 6, so mPowerd will default to 7606 in v76a.
NetSol is recommending that for the Shared User module that the hosted ports be equal to the
dedicated ports just described, plus 3, so the shared ports would be 7603 and 7609, respectively.
The precise format of this entry is important, including the comment. When SETUP
looks to see if a port selected by the administrator is available, it can detect whether or not an existing entry is one that was created by SETUP
at some earlier point and so make appropriate modifications including allowing the port to be reassigned, but only if the format is exactly what is expected.
[lpuser:~] grep nst_lp /etc/services
nst_lp76a${INST_ID}_7600 7600/tcp # ${INST_ID_CMT} LeasePak v76a leasepakd /opt/nst/v76a
mPowerd service request – entry #1
The mPowerd service is an Internet service available on certain exposed TCP ports of the application host.
In configuration, it is identical to leasepakd in every respect, except that its service ID is nst_mp76a${INST_ID}_7606 and its default port 7606, prompted for in SETUP by the prompt TCP port assignment for mPowerd inet daemon [**], and its value is available through the environment variable $MPOWERD_PORT
.
These entries are created using the following values from SETUP
:
-
$leasepak_version
– the LeasePak release version
-
$MPOWERD_PORT
– the port to use for mPowerd
-
$MPWDPORT_INSTYPE
– whether to install a new entries or to
replace them
-
$MPWDPORT_TO_REPL
– if replacing a port, which one
-
$SYSINSTALLFLAGS
– position 6:
Y = install nst_mp76a${INST_ID}_7606
N = do not install nst_mp76a${INST_ID}_7606
-
$MPWD_SVC_ID
– the service ID being installed for
mPowerd, of the form mpwrsvc
.
[lpuser:~] grep nst_mp /etc/services
nst_mp76a${INST_ID}_7606 7606/tcp # ${INST_ID_CMT} LeasePak v76a mPowerd /opt/nst/v76a
leasepakd service request – HP-UX & Solaris – entry #2
/etc/inetd.conf
:
[lpuser:~] grep nst_mp /etc/inetd.conf
nst_mp76a${INST_ID}_7606 stream tcp nowait root \
/opt/nst/v76a/live/bin/leasepakd \
leasepakd –d /opt/nst/v76a \
–l /opt/nst/v76a/log/leasepakd.log \
–f /opt/nst/v76a/etc/${HOST}_v76a_rt.lpkd
where:
-
nst_mp76a${INST_ID}_7606
– the service ID which connects
this entry to entry #1 on /etc/services
-
stream tcp nowait root
– these provide detailed information about the
protocol in use
-
/opt/nst/v76a/live/bin/leasepakd
– the full pathname of the
image invoked to handle requests for this service
-
leasepakd –d /opt/nst/v76a –l /opt/nst/v76a/log/leasepakd.log \
–f /opt/nst/v76a/etc/${HOST}_v76a_rt.lpkd
&nfash; the full command line for the service
[lpuser:~] grep leasepakd /etc/inetd.conf
nst_lp76a${INST_ID}_7600 stream tcp nowait root \
/opt/nst/v76a/live/bin/leasepakd leasepakd \
–d /opt/nst/v76a –l /opt/nst/v76a/log/leasepakd.log \
–f /opt/nst/v76a/etc/${HOST}_v76a_rt.lpkd
mPowerd service request – HP-UX & Solaris – entry #2
In configuration, mPowerd's second entry it is identical to that of
leasepakd in every respect, except that its service ID is
nst_mp76a${INST_ID}_7606
and the path components which of course
reflect mPowerd.
[lpuser:~] grep mPowerd /etc/inetd.conf
nst_mp76a${INST_ID}_7606 stream tcp nowait root \
/opt/nst/v76a/live/bin/mPowerd mPowerd \
–d /opt/nst/v76a –l /opt/nst/v76a/log/mPowerd.log \
–f /opt/nst/v76a/etc/${HOST}_v76a_rt.lpkd
leasepakd service request – Linux – entry #2
/etc/xinetd.d/nst_lp76a${INST_ID}_7600
:
[lpuser:~] cat nst_lp*
# default: off
# description: leasepakd allows connections to
# ${INST_ID_CMT} LeasePak v76a leasepakd /opt/nst/v76a
service nst_lp76a${INST_ID}_7600{
disable = no
id = nst_lp76a${INST_ID}_7600 socket_type = stream
user = root
server = /opt/nst/v76a/live/bin/leasepakd
wait = no
protocol = tcp
port = 7600
server_args = –d /opt/nst/v76a –l /opt/nst/v76a/log/leasepakd.log \
–f /opt/nst/v76a/etc/${HOST}_v76a_rt.lpkd
}
where:
-
# ${INST_ID_CMT} LeasePak v76a leasepakd /opt/nst/v76a
– service comment as in /etc/services
-
disable
= no – service is enabled
-
id = nst_lp76a${INST_ID}_7600
– the service ID which connects this entry to entry #1 in /etc/services
-
socket_type = stream
protocol = tcp
wait = no
– these provide detailed information about the protocol in use
-
server = /opt/nst/v76a/live/bin/leasepakd – the full pathname of the image invoked to handle requests for this service
-
port = 7600 – the port associated with this service as in
/etc/services
-
server_args = –d /opt/nst/v76a –l /opt/nst/v76a/log/leasepakd.log \ –f /opt/nst/v76a/etc/${HOST}_v76a_rt.lpkd – the command line arguments for the service
mPowerd service request – Linux – entry #2
In configuration, mPowerd's second entry it is identical to that of leasepakd in every respect, except that its service ID is nst_mp76a${INST_ID}_7606
and the path components which of course reflect mPowerd.
In that light, there is little reason to display /etc/xinetd.d/nst_mp76a${INST_ID}_7606
.
xinetd.conf Access Restriction Defaults
Include the following in /etc/inetd.conf
:
#Define access restriction defaults
#
# no_access =
# only_from =
# max_load = 0
cps = 50 10
instances = 50
per_source = UNLIMITED