ssh_tunnel statistics: napoleon to zippy

Time: 2022-Oct-05 15:20:07 Wed

Current tunnel state: disabled          Current tunnel condition: DOWN

loader stats

------ loader (pid: 8060 ) ------------ (v3.26 2006/04/15) ----- State: disabled DOWN
Time:                2022-Jun-05 16:30:05 Sun
client:              napoleon
server:              zippy
client heartbeat:    Client Heartbeat
server heartbeat:    Server Heartbeat
server heartbeat 1:  Server Heartbeat 1
server heartbeat 2:  Server Heartbeat 2
server heartbeat 3:  Server Heartbeat 3
server heartbeat 4:  Server Heartbeat 4
Sleep time:          238
loader loop counter: 0
bad port tests:      0     last: none yet
failed file updates: 0     last: none yet
tunnels killed:      3     last: 2022-Jun-05 16:30:05 Sun
emails sent:         0     last: none yet
email addresses:     john@larsen-family.us
loader started:      YYYY-MMM-DD HH:MM:SS DOW
debug flags:         0x0

tunnel stats

------ tunnel (pid: 9535 ) ------------ (v3.26 2006/04/15) ----- State: enabled UP
Time:                2021-Jul-06 20:31:15 Tue
client:              napoleon
server:              zippy
client heartbeat:    Client Heartbeat
server heartbeat:    Thu May 20 22:10:31 EDT 2021
Sleep time:          238
tunnel loop counter: 2
bad port tests:      0     last: none yet
emails sent:         1     last: 2021-Jul-06 20:27:13 Tue
email addresses:     john@larsen-family.us
tunnel started:      2021-Jul-06 20:27:16 Tue
debug flags:         0x0

Current users, uptime, and load average

 15:20:07 up  3:05,  0 users,  load average: 3.23, 3.14, 2.96
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT

Current processes

UID        PID  PPID  C STIME TTY          TIME CMD
cyg_ser+   783     1  0 18:14 ?        00:00:00 /usr/bin/cygrunsrv
jlarsen   1468     1  1 21:20 ?        00:00:00 /usr/bin/perl -w /home/jlarsen/ssh_tunnel/zippy/ssh_tunnel.pl
jlarsen    784   782  0 18:14 ?        00:00:00 /usr/sbin/cron -n
cyg_ser+   785   783  0 18:14 ?        00:00:00 /usr/sbin/sshd -D
jlarsen    782     1  0 18:14 ?        00:00:00 /usr/bin/cygrunsrv
jlarsen   1452   784  0 21:20 ?        00:00:00 /usr/sbin/cron -n
jlarsen   1473  1468  0 21:20 ?        00:00:00 /usr/bin/procps -edf

Current netstat


Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    127.0.0.1:49350        napoleon:49887         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49888         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49889         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49890         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49891         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49905         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49906         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49907         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49908         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49911         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49912         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49913         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49914         CLOSE_WAIT
  TCP    127.0.0.1:49350        napoleon:49915         CLOSE_WAIT
  TCP    127.0.0.1:49786        napoleon:49903         ESTABLISHED
  TCP    127.0.0.1:49791        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49792        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49795        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49796        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49797        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49798        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49799        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49800        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49801        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49802        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49804        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49805        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49806        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49807        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49808        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49809        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49810        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49811        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49812        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49816        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49817        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49818        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49819        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49820        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49821        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49822        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49824        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49826        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49827        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49828        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49829        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49834        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49835        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49836        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49837        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49838        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49839        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49840        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49841        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49842        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49843        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49845        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49846        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49847        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49848        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49849        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49850        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49851        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49852        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49853        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49854        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49855        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49856        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49857        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49858        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49859        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49860        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49861        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49862        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49863        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49864        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49865        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49866        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49868        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49869        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49870        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49871        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49872        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49873        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49874        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49875        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49877        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49878        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49881        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49882        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49883        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49884        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49885        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49886        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49887        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49888        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49889        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49890        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49891        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49892        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49893        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49894        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49895        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49896        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49897        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49898        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49899        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49900        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49901        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49902        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49903        napoleon:49786         ESTABLISHED
  TCP    127.0.0.1:49904        napoleon:49350         TIME_WAIT
  TCP    127.0.0.1:49905        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49906        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49907        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49908        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49911        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49912        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49913        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49914        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:49915        napoleon:49350         FIN_WAIT_2
  TCP    127.0.0.1:50011        napoleon:50012         ESTABLISHED
  TCP    127.0.0.1:50012        napoleon:50011         ESTABLISHED
  TCP    127.0.0.1:50018        napoleon:50019         ESTABLISHED
  TCP    127.0.0.1:50019        napoleon:50018         ESTABLISHED
  TCP    192.168.0.6:49684      52.159.126.152:https   ESTABLISHED
  TCP    192.168.0.6:49705      162.159.130.232:https  TIME_WAIT
  TCP    192.168.0.6:49739      a23-58-85-17:https     CLOSE_WAIT
  TCP    192.168.0.6:49741      a23-55-104-43:https    CLOSE_WAIT
  TCP    192.168.0.6:49742      a23-55-104-43:https    CLOSE_WAIT
  TCP    192.168.0.6:49743      a23-55-104-43:https    CLOSE_WAIT
  TCP    192.168.0.6:49744      a23-55-104-43:https    CLOSE_WAIT
  TCP    192.168.0.6:49745      a23-55-104-43:https    CLOSE_WAIT
  TCP    192.168.0.6:49772      ec2-34-226-81-235:https  CLOSE_WAIT
  TCP    192.168.0.6:49773      ec2-18-205-74-136:https  CLOSE_WAIT
  TCP    192.168.0.6:49794      162.159.128.233:https  ESTABLISHED
  TCP    192.168.0.6:49803      ec2-52-203-145-41:https  ESTABLISHED
  TCP    192.168.0.6:49815      123:https              ESTABLISHED
  TCP    192.168.0.6:49830      ec2-44-209-239-90:https  ESTABLISHED
  TCP    192.168.0.6:49831      72.21.91.29:http       ESTABLISHED
  TCP    192.168.0.6:49832      a23-211-75-63:http     ESTABLISHED
  TCP    192.168.0.6:49833      72.21.91.29:http       ESTABLISHED
  TCP    192.168.0.6:49844      ec2-34-194-62-81:https  ESTABLISHED
  TCP    192.168.0.6:49880      173-14-166-6-NewEngland:ssh  TIME_WAIT
  TCP    192.168.0.6:50063      ec2-54-187-71-185:https  ESTABLISHED
  TCP    192.168.0.6:53058      162.159.135.234:https  ESTABLISHED
  TCP    192.168.0.6:53489      a104-66-33-26:https    CLOSE_WAIT
  TCP    192.168.0.6:53491      a104-66-33-26:https    CLOSE_WAIT
  TCP    192.168.0.6:56233      assets:https           ESTABLISHED
  TCP    192.168.0.6:59825      ec2-54-225-152-45:https  ESTABLISHED
  TCP    192.168.0.6:62743      a104-66-33-26:https    CLOSE_WAIT
  TCP    192.168.0.6:62923      a23-58-116-8:https     CLOSE_WAIT
  TCP    192.168.0.6:62940      74.114.154.23:https    ESTABLISHED

crontab file

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.NWVI6ROpNU installed on Mon Jul  5 15:58:09 2021)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
MAILTO=john@larsen-family.us
#* * * * * echo "`date`: This is an email test"; echo `date` > /tmp/crontest.$LOGNAME.txt

# For now do diskusage by itself until restore of nashua files is completed
#0 21 * * * /home/jlarsen/diskusage/diskusage -n 50 -e john@larsen-family.us

## This script restores files from zippy back to napoleon
#10,40 * * * * /home/jlarsen/napoleon_restore/napoleon_restore.sh /c/napoleon_nashua
#34 22 * * * /home/jlarsen/napoleon_restore/napoleon_restore.sh /c/napoleon_nashua

# Check if the ssh_tunnel is up and running
0,10,20,30,40,50 * * * * /home/jlarsen/ssh_tunnel/zippy/ssh_tunnel.pl

# Perform the nightly backup --------------------------------------
#2 17,21 * * * /home/jlarsen/backup/backup.cron
7 21 * * * /home/jlarsen/backup/backup.cron
8 21 * * * /home/jlarsen/backup/backup.cron
#7 22 * * * /home/jlarsen/backup/backup.cron

# UPDATE LOCATE DATABASE ---------------------------------------
#02 15,18,21 * * * /home/jlarsen/bin/updatedb.cron
02 19 * * * /home/jlarsen/bin/updatedb.cron

loader.conf file

# Filename:  loader.conf
# Description:  This is the configuration file for the loader portion of the 
# ssh_tunnel program.  The contents of this file never change.  This insures
# that the loader will always operate.  It is important not to change the 
# formatting of this file because it is read by the ssh_tunnel and processed 
# using perl which is expecting things to be in certain locations.
#
# loader.conf has two sections:
# 1. Configuration information such as the names of the ssh and sshd
#    hosts, the working directories on each host, and other data as needed.
# 2. The ssh host configuration for the loader program is in this file.
#    That configuration should never change.  It needs to be at the end
#    of the file because ssh uses everything between "Host" entries as
#    configuration.  There is only one Host section in this file.
#
########################################################################
# The following section contains host information 
# SSH_CLIENT      napoleon
# SSH_CLIENT_DIR  /home/jlarsen/ssh_tunnel/zippy
# SSH_SERVER      zippy
# SSH_SERVER_DIR  /home/tunnels/ssh_tunnel/napoleon
#
########################################################################
# The following section is the ssh config file for the loader program.
# IMPORTANT!  The path on the client MUST have the SSH_SERVER name in
# it.  The script uses this name is search strings and it MUST be there.
Host loader
HostName sml.dnsalias.org
Port = 22
UserKnownHostsFile = /home/jlarsen/ssh_tunnel/zippy/known_hosts
User = tunnels
IdentityFile = /home/jlarsen/ssh_tunnel/zippy/id_rsa.rlarsen

tunnel.conf file

# Filename:  tunnel.conf
#
# Description:  This is the configuration file for the tunnel portion of the 
# ssh_tunnel program.  The contents of this file can be changed during program execution.
# It is important not to change the formatting of the file because it is read by the
# tunnel program and processed using awk which is expecting things to be in certain
# locations.
#
# tunnel.conf has three sections:
# 1. Configuration information such as email addresses and thresholds.
# 2. The ssh host configuration for the tunnel.  This consists of two
#    host definitions, tunnel and heartbeat.  The tunnel is the permanent
#    connection and defines port forwarding.  The heartbeat uses one of 
#    the forwarded ports to write and copy heartbeat files between the
#    ssh client and the ssh server.  Changing heartbeats indicate that the
#    tunnel is functioning.
# 3. The webpage configuration section as described below.  This has the
#    ssh host configuration for updating a webpage on a webserver.
#
################################################################################
# The following section contains configuration information
#
# The tunnel is either "enabled" or "disabled" based on the value given
# below.  If disabled, then no processes are running on either the
# client or the server.  A cron job on the client runs ssh_tunnel.pl periodically
# to check if tunnel.conf has changed on the server.  If a change is detected
# then the new tunnel.conf file is transfered over.  If the tunnel state
# becomes "enabled" then the tunnel is activated.
# TUNNEL_STATE disabled
#
# The email addresses below receive diagnostic messages.  Separate
# multiple addresses with commas and no white space.  The word "none"
# turns off email sending and is the default.  The same email address
# is used by cron, loader, tunnel, and pulse.
# EMAIL_ADDRESS     john@larsen-family.us
#
# The threshold defined below is how many port failures are required
# before an email is sent.  Set this to "none" to turn this off.  If
# the ssh_server's ssh port isn't accessible then the loader kills 
# the tunnel.  This periodic email serves as a reminder that the tunnel
# is down.
# EMAIL_THRESHOLD   50
#
# The loader, tunnel, and pulse programs all have the same sleep value.
# The sleep time can be changed here.  It should be in the range of
# 60 to 3600 seconds.  Shorter sleep times increase system loading.
# The sleep time must be less than half the crontab time for ssh_tunnel.pl.
# SLEEP_TIME        238
#
#
################################################################################
# The following section is the ssh config file for the tunnel program.
# IMPORTANT!  The path on the client MUST have the SSH_SERVER name in
# it.  The script uses this name is search strings and it MUST be there.
#
# Important info about port numbers used in the "ssh_tunnel" and "heartbeat"
# sections below.  The "heartbeat" Port number must be the same as the last
# two port numbers in the "ssh_tunnel" section.  In this example 50022 is
# used.  The port number used must be unused by anything else on the two
# machines.  If you have multiple tunnels connecting to a single ssh_server
# be sure to use different port numbers.  
#
# Another requirement is that the ssh_server must be configured to
# allow remote port forwarding.  This is normally off by default in the 
# ssh_server's sshd_config file.  Set "GatewayPorts yes" in sshd_config.
#
Host tunnel
HostName sml.dnsalias.org
Port = 22
UserKnownHostsFile = /home/jlarsen/ssh_tunnel/zippy/known_hosts
User = tunnels
IdentityFile = /home/jlarsen/ssh_tunnel/zippy/id_rsa.rlarsen
Compression = yes
RemoteForward = 13999 localhost:5900
RemoteForward = 13222 localhost:22
RemoteForward = 13022 localhost:22
LocalForward = 13022 localhost:22

################################################################################
Host heartbeat
HostName localhost
Port = 13022
UserKnownHostsFile = /home/jlarsen/ssh_tunnel/zippy/known_hosts
User = tunnels
IdentityFile = /home/jlarsen/ssh_tunnel/zippy/id_rsa.rlarsen

################################################################################
Host pulse
HostName localhost
Port = 13022
UserKnownHostsFile = /home/tunnels/ssh_tunnel/napoleon/known_hosts
User = jlarsen
IdentityFile = /home/tunnels/ssh_tunnel/napoleon/id_rsa.rlarsen

################################################################################
# Note: This section must be last in tunnel.conf.
# A webpage will be copied to the directory set by WEBSERVER_DIR below.  The
# default value "none" turns this feature off.  Change "none" to the directory
# path where the webpage should be copied.  The "webpage" host information 
# below must also be changed to valid values to make this work.
# WEBSERVER_DIR     /home/tunnels/ssh_tunnel_html
#
# The filename of the webpage copied to the webserver defaults to
# SSH_CLIENT_to_SSH_SERVER.html.  To choose a different name replace the
# word "default" on the line below with the desired name.
# WEBPAGE_FILENAME  default
#
# A copy of the webpage can be put in the directory define by WEBPAGE_LOCAL_DIR.
# Change "none" to a valid directory to enable this feature.
# WEBPAGE_LOCAL_DIR  none
#
# The webpage update rate defaults to once per sleep time. Change the value below
# to select a different rate.  The update rate is the number of times through the
# loader while loop before updating the webpage.  This value is ignored when events
# occur such as the tunnel going down or during startup.  The webpage is updated
# for all non normal runtime events.
# WEBPAGE_UPDATE_RATE   1
#
Host webpage
HostName sml.dnsalias.org
Port = 22
UserKnownHostsFile = /home/jlarsen/ssh_tunnel/zippy/known_hosts
User = tunnels
IdentityFile = /home/jlarsen/ssh_tunnel/zippy/id_rsa.rlarsen