Login

386cottrell@pinger:~$ssh rcottre@bastion.desy.de
Warning: Permanently added the RSA host key for IP address '131.169.5.83' to the list of known hosts.
rcottre@bastion.desy.de's password:
Questions concerning bastion? see http://bastion.desy.de for the Bastion FAQ.
[rcottre@bastion03]~%

Then login to ping.desy.de as root, no password required

[rcottre@bastion01]~% ssh root@iepm01-e17.desy.de
ssh: Could not resolve hostname iepm01-e17.desy.de: Name or service not known
[rcottre@bastion01]~% ssh root@ping.desy.de
Last login: Wed Jun  7 08:34:45 2017 from mystphi.desy.de
Welcome to DESY IT
[root@iepm01-el7 ~]#

N.b. you can't login as rcottre

386cottrell@pinger:~$ssh rcottre@bastion.desy.de
Warning: Permanently added the RSA host key for IP address '131.169.5.83' to the list of known hosts.
rcottre@bastion.desy.de's password:
Questions concerning bastion? see http://bastion.desy.de for the Bastion FAQ.
[rcottre@bastion03]~% ssh iepm01-el7.desy.de
Creating directory '/afs/desy.de/user/r/rcottre'.
Unable to create and initialize directory '/afs/desy.de/user/r/rcottre'.
Welcome to DESY IT
Could not chdir to home directory /afs/desy.de/user/r/rcottre: No such file or directory
#The f directory does exist on bastion.desy.de
[rcottre@bastion03]~% pwd
/afs/desy.de/user/r/rcottre

Saving stuff

The scripts are saved in 

[root@iepm01-el7 pinger]# ls -l /root/pinger
total 232
-rw-r--r-- 1 root root  15101 Jan  7  2000 cgi-lib.pl.txt
-rw-r--r-- 1 root root  48852 Mar 15  2016 ping_data.pl
-rw-r--r-- 1 root root 114361 Jun 11  2015 pinger-2.0.7.tar.gz
-rw-r--r-- 1 root root   6626 May 22  2009 pinger_trimmer.pl
-rw-r--r-- 1 root root  48927 Sep 20  2016 traceroute.pl

The cgi scripts are copied to:

[root@iepm01-el7 pinger]# ls -l /var/www/cgi-bin
total 112
-rwxr-xr-x 1 root root 15101 May  5 03:30 cgi-lib.pl
-rwxr-xr-x 1 root root 48852 May  5 03:29 ping_data.pl
-rwxr-xr-x 1 root root 48927 Sep 20  2016 traceroute.pl

Install pinger2.pl

Follow the instructions at http://www.slac.stanford.edu/comp/net/wan-mon/Pinger2/, also see http://www.slac.stanford.edu/comp/net/wan-mon/Pinger2/Projects%20%20GARDeN.htm for prerequisites.

[root@iepm01-el7 ~]# tar xzf pinger-2.0.7.tar.gz
[root@iepm01-el7 ~]# cd pinger-2.0.7
[root@iepm01-el7 pinger-2.0.7]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for bash... /bin/sh
checking for perl... /usr/bin/perl
checking for ping... /usr/bin/ping
checking for ping6... /usr/sbin/ping6
checking for dig... /usr/bin/dig
checking for lynx... /usr/bin/lynx
checking for mail... /usr/bin/mail
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sw/Makefile
config.status: creating docs/Makefile
[root@iepm01-el7 pinger-2.0.7]# make test_prereqs
[root@iepm01-el7 pinger-2.0.7]# make

Making all in sw
make[1]: Entering directory `/root/pinger-2.0.7/sw'
rm -f pinger.xml
/usr/bin/perl installPingerXML.pl LYNX /usr/bin/lynx PINGV4 /usr/bin/ping PINGV6 /usr/sbin/ping6 DNSV4 /usr/local/share/pinger/dnsV4Cmd.pl DNSV6 /usr/bin/dig SRCNAME `hostname -f` DATADIR /usr/local/share/pinger/data MAIL /usr/bin/mail > pinger.xml
rm -f pinger2
echo "#! " /bin/sh > pinger2
echo "cd /usr/local/share/pinger" >> pinger2
echo "/usr/bin/perl pinger2.pl" >> pinger2
chmod ugo+x pinger2
make[1]: Leaving directory `/root/pinger-2.0.7/sw'
Making all in docs
make[1]: Entering directory `/root/pinger-2.0.7/docs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/pinger-2.0.7/docs'
make[1]: Entering directory `/root/pinger-2.0.7'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/root/pinger-2.0.7'

[root@iepm01-el7 pinger-2.0.7]# make install
Making install in sw
make[1]: Entering directory `/root/pinger-2.0.7/sw'
make[2]: Entering directory `/root/pinger-2.0.7/sw'
/bin/sh ../mkinstalldirs /usr/local/bin
/usr/bin/install -c pinger2 /usr/local/bin/pinger2
mkdir -p /usr/local/share/pinger/data
/bin/sh ../mkinstalldirs /usr/local/share/pinger
/usr/bin/install -c -m 644 pinger2.pl /usr/local/share/pinger/pinger2.pl
/usr/bin/install -c -m 644 pinger.xsd /usr/local/share/pinger/pinger.xsd
/usr/bin/install -c -m 644 pinger.xml /usr/local/share/pinger/pinger.xml
/usr/bin/install -c -m 644 dnsV4Cmd.pl /usr/local/share/pinger/dnsV4Cmd.pl
/usr/bin/install -c -m 644 beacons.txt /usr/local/share/pinger/beacons.txt
/usr/bin/install -c -m 644 installCron.pl /usr/local/share/pinger/installCron.pl
make install-data-hook
make[3]: Entering directory `/root/pinger-2.0.7/sw'
chmod ugo+x /usr/local/share/pinger/installCron.pl
chmod ugo+x /usr/local/share/pinger/dnsV4Cmd.pl
make[3]: Leaving directory `/root/pinger-2.0.7/sw'
make[2]: Leaving directory `/root/pinger-2.0.7/sw'
make[1]: Leaving directory `/root/pinger-2.0.7/sw'
Making install in docs
make[1]: Entering directory `/root/pinger-2.0.7/docs'
make[2]: Entering directory `/root/pinger-2.0.7/docs'
make[2]: Nothing to be done for `install-exec-am'.
/bin/sh ../mkinstalldirs /usr/local/man/man1
mkdir -p -- /usr/local/man/man1
/usr/bin/install -c -m 644 ./pinger2.1 /usr/local/man/man1/pinger2.1
/bin/sh ../mkinstalldirs /usr/local/share/pinger
/usr/bin/install -c -m 644 pinger2.html /usr/local/share/pinger/pinger2.html
make[2]: Leaving directory `/root/pinger-2.0.7/docs'
make[1]: Leaving directory `/root/pinger-2.0.7/docs'
make[1]: Entering directory `/root/pinger-2.0.7'
make[2]: Entering directory `/root/pinger-2.0.7'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/pinger-2.0.7'
make[1]: Leaving directory `/root/pinger-2.0.7'
[root@iepm01-el7 pinger-2.0.7]# make install_cron

/bin/sh -c "cd /usr/local/share/pinger; /usr/bin/perl installCron.pl"
Prototype after '%' for main::printCronTimeInfo : %% at installCron.pl line 75.
Setting Cron Interval to: once every 30 minutes

Old Crontab-Content

# HEADER: This file was autogenerated at 2017-03-13 12:24:22 +0100 by puppet.
# HEADER: While it can still be managed manually, it is definitely not recommended.
# HEADER: Note particularly that the comments starting with 'Puppet Name' should
# HEADER: not be deleted, as doing so could cause duplicate cron jobs.
# Puppet Name: ssh-known-hosts
21 */6 * * * /usr/local/sbin/fetch-ssh-known-hosts
# Puppet Name: factertoyaml
13,33,53 * * * * /usr/local/bin/facter_to_yaml.rb 2>/dev/null

New Crontab-Content

# HEADER: not be deleted, as doing so could cause duplicate cron jobs.
# Puppet Name: ssh-known-hosts
21 */6 * * * /usr/local/sbin/fetch-ssh-known-hosts
# Puppet Name: factertoyaml
13,33,53 * * * * /usr/local/bin/facter_to_yaml.rb 2>/dev/null
*/30 * * * * cd /usr/local/share/pinger; perl /usr/local/share/pinger/pinger2.pl > /usr/local/share/pinger/pingerCronStat.stdout 2> /usr/local/share/pinger/pingerCronStat.stderr

Crontab successfully updated!!
We are done here exiting...

pinger.xml

This is kept at /usr/local/share/pinger/pinger.xml and may need editing.  In particular:

  <SrcName>ping.desy.de</SrcName>

Changing hostname

[root@iepm01-el7 ~]# cat /etc/hostname
iepm01-el7.desy.de
[root@iepm01-el7 ~]# hostname ping
[root@iepm01-el7 ~]# hostname
ping
[root@iepm01-el7 ~]# vim /etc/hostname #To make it permanent edit this file
[root@iepm01-el7 ~]# sysctl kernel.hostname
kernel.hostname = ping


traceroute.pl

[root@iepm01-el7 ~]# cd /var/www/cgi-bin
[root@iepm01-el7 cgi-bin]#  wget 'http://www.slac.stanford.edu/comp/net/traceroute/traceroute.pl'
--2017-04-26 23:24:01--  http://www.slac.stanford.edu/comp/net/traceroute/traceroute.pl
Resolving www.slac.stanford.edu (www.slac.stanford.edu)... 134.79.197.200, 2620:114:d000:2716::200
Connecting to www.slac.stanford.edu (www.slac.stanford.edu)|134.79.197.200|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48927 (48K) [text/plain]
Saving to: âtraceroute.plâ
100%[======================================>] 48,927      71.4KB/s   in 0.7s
2017-04-26 23:24:02 (71.4 KB/s) - âtraceroute.plâ saved [48927/48927]
[root@iepm01-el7 cgi-bin]# ls -l traceroute.pl
-rw-r--r-- 1 root root 48927 Sep 20  2016 traceroute.pl
[root@iepm01-el7 cgi-bin]# chmod +x traceroute.pl
[root@iepm01-el7 cgi-bin]# ls -l traceroute.pl
-rwxr-xr-x 1 root root 48927 Sep 20  2016 traceroute.pl

http://ping.desy.de/cgi-bin/traceroute.pl works

 

Try and access the web server via URL http://iepm01-el17.desy.de/cgi-bin/traceroute.pl, I got

Found it has a DNS registration, it is pingable but from the Internet (SLAC) port 80 is not responding

388cottrell@pinger:~$nslookup iepm01-el7.desy.de Server: 134.79.111.111 Address: 134.79.111.111#53 Non-authoritative answer: Name: iepm01-el7.desy.de Address: 131.169.5.47 391cottrell@pinger:~$ping iepm01-el7.desy.de PING iepm01-el7.desy.de (131.169.5.47) 56(84) bytes of data. 64 bytes from iepm01-el7.desy.de (131.169.5.47): icmp_seq=1 ttl=45 time=166 ms 64 bytes from iepm01-el7.desy.de (131.169.5.47): icmp_seq=2 ttl=45 time=167 ms 64 bytes from iepm01-el7.desy.de (131.169.5.47): icmp_seq=3 ttl=45 time=166 ms ^C --- iepm01-el7.desy.de ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2508ms rtt min/avg/max/mdev = 166.934/166.991/167.054/0.337 ms 389cottrell@pinger:~$telnet iepm01-el7.desy.de 80 Trying 131.169.5.47... telnet: connect to address 131.169.5.47: Connection refused Exit 1

 

 

 

 

  • No labels