ssh_tunnel statistics: rlarsen to zippy

Time: 2017-Aug-17 09:30:04 Thu

Current tunnel state: disabled          Current tunnel condition: DOWN

loader stats

------ loader (pid: 7876 ) ------------ (v3.26 2006/04/15) ----- State: disabled DOWN
Time:                2017-Jun-08 06:50:02 Thu
client:              rlarsen
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: 2017-Jun-08 06:50:02 Thu
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: 892 ) ------------ (v3.26 2006/04/15) ----- State: enabled UP
Time:                2016-Oct-30 13:05:29 Sun
client:              rlarsen
server:              zippy
client heartbeat:    Sun Oct 30 13:05:24 MDT 2016
server heartbeat:    Sun Oct 30 14:01:28 EST 2016
Sleep time:          238
tunnel loop counter: 2
bad port tests:      0     last: none yet
emails sent:         1     last: 2016-Oct-30 13:00:54 Sun
email addresses:     john@larsen-family.us
tunnel started:      2016-Oct-30 13:01:26 Sun
debug flags:         0x0

Current users, uptime, and load average

 09:30:04 up 32 days, 21:43,  0 users,  load average: 0.00, 0.00, 0.00
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT

Current processes

UID        PID  PPID  C STIME TTY          TIME CMD
1005      8016  4664  0 Jul23 ?        00:00:10 /usr/sbin/sshd -D -R
1005      2056  1604  0 Jul15 ?        00:45:00 /usr/sbin/sshd -D
jlarsen   5712  7896  3 09:30 ?        00:00:00 
1005      6176  2056  0 Aug01 ?        00:00:03 /usr/sbin/sshd -D -R
1005      4664  2056  0 Jul23 ?        00:00:04 /usr/sbin/sshd -D -R
jlarsen   6432  5260  0 09:30 ?        00:00:00 /usr/bin/procps -edf
1005      3280  2056  1 09:30 ?        00:00:00 /usr/sbin/sshd -D -R
jlarsen   7896  1620  0 09:30 ?        00:00:00 /usr/sbin/cron -n
1005      2992  6176  0 Aug01 ?        00:00:07 /usr/sbin/sshd -D -R
1005      1604     1  0 Jul15 ?        00:00:05 /usr/bin/cygrunsrv
jlarsen   1620  1580  0 Jul15 ?        00:00:23 /usr/sbin/cron -n
1005      6520  3280  1 09:30 ?        00:00:00 /usr/sbin/sshd -D -R
jlarsen   5260     1  0 09:30 ?        00:00:00 /usr/bin/perl -w /home/jlarsen/ssh_tunnel/zippy/ssh_tunnel.pl
jlarsen   1580     1  0 Jul15 ?        00:00:05 /usr/bin/cygrunsrv

Current netstat


Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    127.0.0.1:5905         Robi-PC:49160          ESTABLISHED
  TCP    127.0.0.1:5905         Robi-PC:49161          ESTABLISHED
  TCP    127.0.0.1:5905         Robi-PC:49162          ESTABLISHED
  TCP    127.0.0.1:5905         Robi-PC:49163          ESTABLISHED
  TCP    127.0.0.1:5905         Robi-PC:49164          ESTABLISHED
  TCP    127.0.0.1:5905         Robi-PC:49165          ESTABLISHED
  TCP    127.0.0.1:5905         Robi-PC:49166          ESTABLISHED
  TCP    127.0.0.1:5905         Robi-PC:49167          ESTABLISHED
  TCP    127.0.0.1:5905         Robi-PC:49168          ESTABLISHED
  TCP    127.0.0.1:5905         Robi-PC:49169          ESTABLISHED
  TCP    127.0.0.1:49160        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:49161        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:49162        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:49163        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:49164        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:49165        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:49166        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:49167        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:49168        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:49169        Robi-PC:5905           ESTABLISHED
  TCP    127.0.0.1:50393        Robi-PC:50394          ESTABLISHED
  TCP    127.0.0.1:50394        Robi-PC:50393          ESTABLISHED
  TCP    127.0.0.1:53499        Robi-PC:53500          TIME_WAIT
  TCP    127.0.0.1:53501        Robi-PC:53502          TIME_WAIT
  TCP    127.0.0.1:53507        Robi-PC:5556           TIME_WAIT
  TCP    127.0.0.1:53513        Robi-PC:53514          TIME_WAIT
  TCP    127.0.0.1:53516        Robi-PC:53517          TIME_WAIT
  TCP    127.0.0.1:53549        Robi-PC:53550          TIME_WAIT
  TCP    127.0.0.1:53551        Robi-PC:53552          TIME_WAIT
  TCP    127.0.0.1:53553        Robi-PC:53554          TIME_WAIT
  TCP    127.0.0.1:53555        Robi-PC:53556          TIME_WAIT
  TCP    127.0.0.1:53557        Robi-PC:53558          TIME_WAIT
  TCP    127.0.0.1:53559        Robi-PC:53560          TIME_WAIT
  TCP    127.0.0.1:53561        Robi-PC:53562          TIME_WAIT
  TCP    127.0.0.1:53563        Robi-PC:53564          TIME_WAIT
  TCP    127.0.0.1:53565        Robi-PC:53566          TIME_WAIT
  TCP    127.0.0.1:53567        Robi-PC:53568          TIME_WAIT
  TCP    127.0.0.1:53573        Robi-PC:5556           TIME_WAIT
  TCP    127.0.0.1:53574        Robi-PC:53575          TIME_WAIT
  TCP    127.0.0.1:53576        Robi-PC:53577          TIME_WAIT
  TCP    127.0.0.1:53578        Robi-PC:53579          TIME_WAIT
  TCP    127.0.0.1:53580        Robi-PC:53581          TIME_WAIT
  TCP    127.0.0.1:53582        Robi-PC:53583          TIME_WAIT
  TCP    127.0.0.1:53584        Robi-PC:53585          TIME_WAIT
  TCP    127.0.0.1:53586        Robi-PC:53587          TIME_WAIT
  TCP    127.0.0.1:53588        Robi-PC:53589          TIME_WAIT
  TCP    127.0.0.1:53590        Robi-PC:53591          TIME_WAIT
  TCP    127.0.0.1:53592        Robi-PC:53593          TIME_WAIT
  TCP    127.0.0.1:53594        Robi-PC:53595          TIME_WAIT
  TCP    127.0.0.1:53596        Robi-PC:53597          TIME_WAIT
  TCP    127.0.0.1:53598        Robi-PC:53599          TIME_WAIT
  TCP    127.0.0.1:53600        Robi-PC:53601          TIME_WAIT
  TCP    127.0.0.1:53608        Robi-PC:5556           TIME_WAIT
  TCP    127.0.0.1:53610        Robi-PC:53611          TIME_WAIT
  TCP    127.0.0.1:53612        Robi-PC:53613          TIME_WAIT
  TCP    127.0.0.1:53614        Robi-PC:53615          TIME_WAIT
  TCP    127.0.0.1:53616        Robi-PC:53617          TIME_WAIT
  TCP    127.0.0.1:53618        Robi-PC:53619          TIME_WAIT
  TCP    127.0.0.1:53620        Robi-PC:53621          TIME_WAIT
  TCP    127.0.0.1:53622        Robi-PC:53623          TIME_WAIT
  TCP    127.0.0.1:53624        Robi-PC:53625          TIME_WAIT
  TCP    127.0.0.1:53626        Robi-PC:53627          TIME_WAIT
  TCP    127.0.0.1:53628        Robi-PC:53629          TIME_WAIT
  TCP    127.0.0.1:53630        Robi-PC:53631          TIME_WAIT
  TCP    127.0.0.1:53632        Robi-PC:53633          TIME_WAIT
  TCP    127.0.0.1:53634        Robi-PC:53635          TIME_WAIT
  TCP    127.0.0.1:53636        Robi-PC:53637          TIME_WAIT
  TCP    127.0.0.1:53638        Robi-PC:53639          TIME_WAIT
  TCP    127.0.0.1:53644        Robi-PC:5556           TIME_WAIT
  TCP    127.0.0.1:53645        Robi-PC:53646          TIME_WAIT
  TCP    127.0.0.1:53647        Robi-PC:53648          TIME_WAIT
  TCP    127.0.0.1:53649        Robi-PC:53650          TIME_WAIT
  TCP    127.0.0.1:53651        Robi-PC:53652          TIME_WAIT
  TCP    127.0.0.1:53653        Robi-PC:53654          TIME_WAIT
  TCP    127.0.0.1:53655        Robi-PC:53656          ESTABLISHED
  TCP    127.0.0.1:53656        Robi-PC:53655          ESTABLISHED
  TCP    127.0.0.1:55271        Robi-PC:55272          ESTABLISHED
  TCP    127.0.0.1:55272        Robi-PC:55271          ESTABLISHED
  TCP    192.168.0.100:22       42.7.26.88:45024       ESTABLISHED
  TCP    192.168.0.100:53508    pkt-sjc-01:http        TIME_WAIT
  TCP    192.168.0.100:53509    104:http               TIME_WAIT
  TCP    192.168.0.100:53510    40.77.69.13:https      TIME_WAIT
  TCP    192.168.0.100:53512    13.91.59.159:https     TIME_WAIT
  TCP    192.168.0.100:53518    cb:https               TIME_WAIT
  TCP    192.168.0.100:53520    104.130.142.174:https  TIME_WAIT
  TCP    192.168.0.100:53522    dgo-yyz1:https         TIME_WAIT
  TCP    192.168.0.100:53524    ec2-54-172-142-152:https  TIME_WAIT
  TCP    192.168.0.100:53526    13.82.25.222:https     TIME_WAIT
  TCP    192.168.0.100:53528    162:https              TIME_WAIT
  TCP    192.168.0.100:53530    104.214.64.216:https   TIME_WAIT
  TCP    192.168.0.100:53532    b5:https               TIME_WAIT
  TCP    192.168.0.100:53534    ec2-52-53-221-187:https  TIME_WAIT
  TCP    192.168.0.100:53536    23.96.215.183:https    TIME_WAIT
  TCP    192.168.0.100:53538    104.130.8.174:https    TIME_WAIT
  TCP    192.168.0.100:53540    212:https              TIME_WAIT
  TCP    192.168.0.100:53542    192.237.172.232:https  TIME_WAIT
  TCP    192.168.0.100:53544    dgo-sfo1:https         TIME_WAIT
  TCP    192.168.0.100:53546    162.243.73.232:https   TIME_WAIT
  TCP    192.168.0.100:53548    104:http               TIME_WAIT
  TCP    192.168.0.100:53602    192.168.0.1:5431       TIME_WAIT
  TCP    192.168.0.100:53603    192.168.0.1:5431       TIME_WAIT
  TCP    192.168.0.100:53658    173-14-166-5-NewEngland:ssh  TIME_WAIT

crontab file

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.pKdIYaqwdf installed on Sat May 28 06:25:24 2016)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
# m h  dom mon dow   command
MAILTO=john@larsen-family.us
#* * * * * echo "`date`: Crontab test" > /tmp/crontab_test.txt; echo "`date`: Crontab test"

# Perform the nightly backup --------------------------------------
2 3 * * * /home/jlarsen/backup/backup.cron
#43 05 * * * /home/jlarsen/backup/backup.cron

# Update the Weintz video mirror --------------------------------------
02 23 * * * /home/jlarsen/weintz_mirror/weintz_mirror.sh /c

# Maintain ssh tunnel ----------------------------------------------
0,10,20,30,40,50 * * * * /home/jlarsen/ssh_tunnel/zippy/ssh_tunnel.pl

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      rlarsen
# SSH_CLIENT_DIR  /home/jlarsen/ssh_tunnel/zippy
# SSH_SERVER      zippy
# SSH_SERVER_DIR  /home/tunnels/ssh_tunnel/rlarsen
#
########################################################################
# 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 = 43999 localhost:5900
RemoteForward = 43222 localhost:22
RemoteForward = 43022 localhost:22
LocalForward = 43022 localhost:22

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

################################################################################
Host pulse
HostName localhost
Port = 43022
UserKnownHostsFile = /home/tunnels/ssh_tunnel/rlarsen/known_hosts
User = jlarsen
IdentityFile = /home/tunnels/ssh_tunnel/rlarsen/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