Dxspider secure login

From now on there is the possibility to set up an ssh tunnel to the Dxcluster server.
This gives the advantage that no plan text login and passwords are sent over telnet. And that your connection to the cluster is secured.
Why, suppressing fake spots and abuse of the network.

Howto

Send me your login username (call) and password you want to use. I will setup a account for you.
After this it possible to connect secure to the dxcluster.
Copy and past this line in your terminal. Change “call” with your username.

ssh -L 7300:localhost:7300 -N -p 7322 call@dx.packet-radio.nl

Look like this.

Enter your password and leave the terminal window open.
After this nothing happens, but there is a secure tunnel.
Now it is possible to connect the dxcluster on localhost:7300

Open a new terminal window en telnet to localhost port 7300

This is also possible with Putty.

Save and open a ssh connection.

Now it is possible to connect your log program or what you want to the DxCluster on localhost port 7300

DxSpider update

Kin EA3CV wrote a fantastic script for updating DxSpider.

Kin Wrote :

If there is a new build, it will update and immediately restart the node.
If there are no changes, the sysop is informed.

To install it, copy the file to /spider/local_cmd
From console.pl run load/cmd the first time.
The check_build command can be used like this:

check_build Y           With Backup
check_build N           Without Backup
check_build             Without Backup

If you want to leave it automated, add in /spider/local_cmd/crontab
something like this:

0 4 * * 1,2,3,4,5 run_cmd(“check_build N”)

It can be downloaded from:

https://www.dropbox.com/s/6ttq5125qrzev67/check_build.pl?dl=0

This utility is not intended to replace the current update procedure,
it is intended for sysops who feel insecure about upgrading their cluster.
(I don’t feel insecure when it comes to updating software. I like it when it’s easier.)

Basically it does:
            git reset –hard
            git pull
            reinicio

and a full backup of the /home/spysop/spider directory in /home/sysop/backup, which will be overwritten each time check_build is run.

# You need the following package:
# apt install libfile-copy-recursive-perl  or
# cpan install File::Copy::Recursive
# Kin EA3CV, ea3cv@cronux.net
#
# 20230201 v1.0
#

use 5.10.1;
use DXDebug;
use File::Copy::Recursive;
use strict;
use warnings;

my $self = shift;
my $backup = shift;

return (1) unless $self->priv >= 9;

if ($backup eq "Y") {
        my $from_dir = "/home/sysop/spider";
        my $to_dir = "/home/sysop/backup";

        if ( !-d $to_dir ) {
                system('mkdir', $to_dir);
        }

        File::Copy::Recursive::rcopy_glob($from_dir, $to_dir);
}

system('cd /spider');

my $act = $main::gitversion;
$act =~ s/\[r\]//g;
my $res;
my $line = "cd /spider; git reset --hard; git pull";
my @out;

system('git reset --hard');

my $data = qx(git pull);
my $new = `git log --oneline | head -n 1`;

if ($data =~ /Updating/) {
        $res = "There is a new build: $new";
        dbg("DXCron::spawn: $res: $line") if isdbg('cron');
        push @out, $res;
        DXCron::run_cmd("shut");
} elsif ($data =~ /Already|actualizado/) {
        $res = "There is no new build ($main::build  $act)";
        push @out, $res;
        dbg("DXCron::spawn: $res.") if isdbg('cron');
}

return (1, @out)

 

DxSpider Crontab

An crontab example I use with my Dxspider node.

# Check Connect (At minute 0, 5, 10, 20, 30, 40, and 50)

0,5,10,20,30,40,50 * * * * start_connect('gb7htl') unless connected('gb7htl')
0,5,10,20,30,40,50 * * * * start_connect('pa1rbz') unless connected('pa1rbz')
0,5,10,20,30,40,50 * * * * start_connect('pi4cc') unless connected('pi4cc')
0,5,10,20,30,40,50 * * * * start_connect('n5wls') unless connected('n5wls')
0,5,10,20,30,40,50 * * * * start_connect('ea2rks-2') unless connected('ea2rks-2')
0,5,10,20,30,40,50 * * * * start_connect('pa2sq') unless connected('pa2sq')
0,5,10,20,30,40,50 * * * * start_connect('ed1zac-5') unless connected('ed1zac-5')

# Update stats for mrtg (At minute 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and 55)
00,05,10,15,20,25,30,35,40,45,50,55 * * * * run_cmd('mrtg all')

# Send announce full/local (At minute 0)
#0 * * * * run_cmd('ann full Dxspider telnet dx.packet-radio.nl 7300' . cldate . ' ' . ztime)
#0 * * * * run_cmd('ann local DXspider telnet dx.packet-radio.nl 7300 at ' . cldate . ' ' . ztime)

# Skimmers (At every minute)
* * * * * start_connect('sk0mmr') unless connected('sk0mmr')
* * * * * start_connect('sk1mmr') unless connected('sk1mmr')

# AutoUpdate DXSpider Server (At 04:00 on Monday, Tuesday, Wednesday, Thursday, and Friday)
0 4 * * 1,2,3,4,5 run_cmd("check_build Y")


# AutoUpdate USDB (At 02:00 on Monday, Wednesday, and Friday)
0 2 * * 1,3,5 spawn("cd /tmp | wget -qN ftp://ftp.w1nr.net/usdbraw.gz & /spider/perl/create_usdb.pl usdbraw.gz")
5 2 * * 1,3,5 run_cmd("load/usdb")
10 2 * * 1,3,5 spawn("rm /tmp/usdbraw.gz")

# AutoUpdate Keps (At 02:00 on Tuesday, Thursday, and Saturday)
0 2 * * 2,4,6 spawn("cd /tmp | wget -qN http://www.amsat.org/amsat/ftp/keps/current/nasabare.txt & /spider/perl/convkeps.pl -p nasabare.txt &")
5 2 * * 2,4,6 run_cmd("load/keps")
10 2 * * 2,4,6 spawn("rm /tmp/nasabare.txt")

# AutoUpdate CTY.DAT (At 03:00 on Sunday, Tuesday, and Friday)
0 3 * * 0,2,5 spawn("cd /spider/local_data | wget -qN https://www.country-files.com/cty/cty.dat &")
0 3 * * 0,2,5 spawn("cd /spider/local_data | wget -qN https://www.country-files.com/cty/wpxloc.dat &")
0 3 * * 0,2,5 spawn("cd /spider/local_data | wget -qN https://www.country-files.com/cty/wpxloc.raw &")
2 3 * * 0,2,5 spawn("cd /spider/local_data | /spider/perl/create_prefix.pl")
3 3 * * 0,2,5 run_cmd("load/prefix")

# remove old files (At 00:00 in every month from January through December)
0 0 * 1-12 * spawn(q[find /spider/local_data/debug -type f -mtime +2 -exec rm -f {} \;])
2 0 * 1-12 * spawn(q[find /spider/local_data/log -type f -mtime +2 -exec rm -f {} \;])
3 0 * 1-12 * spawn(q[find /spider/local_data/spots -type f -mtime +2 -exec rm -f {} \;])
4 0 * 1-12 * spawn(q[find /spider/local_data/wcy -type f -mtime +1 -exec rm -f {} \;])
5 0 * 1-12 * spawn(q[find /spider/local_data/wwv -type f -mtime +1 -exec rm -f {} \;])

# Blacklist. TOR & Others (At minute 30)
30 * * * * spawn('cd /spider/local_data; wget -qN http://www.dxspider.net/download/badip.torexit')
30 * * * * spawn('cd /spider/local_data; wget -qN http://www.dxspider.net/download/badip.torrelay')
30 * * * * spawn('cd /spider/local_data; wget -qN http://www.dxspider.net/download/badip.global')
31 * * * * run_cmd('load/badip')

 

Dx Cluster PI1LAP-1

PI1LAP is Running DXSpider as Cluster Software. With Postgresql as database backend for Web Cluster http://dx.packet-radio.nl

PI1LAP is also connected to the Reverse Beacon Network (RBN). Now it is possible to see (Live) Spots from CW, BEACON, RTTY, PSK, FT8 and FT4.
Connect to PI1LAP-1 (telnet dx.packet-radio.nl 7300) and give the command “help set/skimmer” to get help about the skimmer feed.

The skimmer feed from CW and FT8 / FT4 can be overwhelming. Now there are all kinds of possibilities to filter this to specific spots. Filter help use the command “help filter” on the cluster.

# Possible Filter
To only allow FT4 spots you can use a filter
set/skimmer ft
reject/rbn 1 info ft8
show/filter # Show the rules in the filter
clear/rbn 1 or all # Delete filter rule

If you like Dx spots (just like me) you can go to “telnet dx.packet-radio.nl 7300

See ya on the Cluster.

Website DxSpider http://www.dxcluster.org/

Install Dxspider on a Debian system

Here is a list of command’s that i use to install dxspider on a fresh system.

sudo apt-get install wget
sudo apt-get install git-core
sudo groupadd spider
sudo useradd -m sysop -G spider
sudo usermod -g spider sysop
sudo passwd sysop
sudo adduser sysop sudo

Install the perl modules

sudo apt-get install libtimedate-perl
sudo apt-get install libnet-telnet-perl
sudo apt-get install libcurses-perl
sudo apt-get install libdigest-sha-perl
sudo apt-get install libdata-dumper-simple-perl

Simlink and reboot

sudo su
cd ~sysop
ln -s /home/sysop/spider /spider
shutdown -r now

After restart login as sysop

login sysop
cd ~
mkdir spider
git clone git://scm.dxcluster.org/scm/spider spider.new
cp -a /home/sysop/spider.new/.git /spider
rm -rf spider.new
cd /spider
git reset --hard
sudo su
cd /home/sysop/
chown -R sysop.spider spider
find . -type d -exec chmod 2775 {} \;
find . -type f -exec chmod 775 {} \;
exit
cd /spider
mkdir local
mkdir local_cmd
cp perl/DXVars.pm.issue local/DXVars.pm
cp perl/Listeners.pm local/Listeners.pm
cd local
nano Listeners.pm
- edit DXVars.pm following the instructions in the comments
- edit Listeners.pm to remove “#” from the line for the port, and add additional ports as needed:
@listen = (
 [“0.0.0.0”, 7300],
);

Next create the sysop

cd /spider/perl/
./create_sysop.pl

Next get the us database

cd /tmp
wget http://ftp.w1nr.net/usdbraw.gz

The next step can take a few minutes

/spider/perl/create_usdb.pl /tmp/usdbraw.gz
cd /spider/src
make

Let start the cluster

cd /spider/perl
./cluster.pl

On a separate ssh or system console, log into the system as sysop

/spider/perl/console.pl

From the command line of the console enter:

load/usdb # US database ?

Edit /etc/inittab to add the following two lines at the end of the file.
Start DXSpider on bootup and respawn it should it crash.

DX:2345:respawn:/bin/su -c "/usr/bin/perl -w /spider/perl/cluster.pl" sysop >/dev/tty6

Add a line to /etc/services for spider

spdlogin   7400/tcp     # spider anonymous login port

Add a line to /etc/inetd.conf for spider

spdlogin       stream  tcp     nowait  sysop   /spider/src/client client login ax25

Add a node to your system.
Create in the dir /spider/connect a file with the name of the node.

nano /spider/connect/pi1lap-4

timeout 15
abort (Busy|Sorry|Fail)
# don't forget to chmod 4775 netrom_call!
connect telnet 44.137.31.65 7300
'login' 'pi1lap-4'

Chmod 4755 pi1lap-4

Now login to your spider.

/spider/perl/console.pl

Hello Niels, this is PI1LAP-4 in Kortgene ZLD, Nederland
running DXSpider V1.55 build 0.196
Cluster: 241 nodes, 1 local / 433 total users  Max users 433  Uptime 5 03:45
PD2LT de PI1LAP-4  8-Dec-2017 1845Z dxspider >
Page Length is now 500
PD2LT de PI1LAP-4  8-Dec-2017 1845Z dxspider >

set/spider pi1lap-4
PI1LAP-4 set as DXSpider style Node
PD2LT de PI1LAP-4  8-Dec-2017 1847Z dxspider >

 

Start DXSpider bij het booten

Om DXSpider te starten bij het booten, moet er wat aangepast worden in de /etc/inittab.
Eerst moet onder staan de regel worden uitgeschakeld, hier kan simpel een # voor.

1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6

We gebruiken tty6 voor DXSpider, dus deze moet worden uitgeschakeld.
Nu kunnen we de onderstaande regel toevoegen aan de /etc/inittab

##Start DXSpider on bootup and respawn it should it crash
DX:2345:respawn:/bin/su -c "/usr/bin/perl -w /spider/perl/cluster.pl" sysop >/dev/tty6

Installeer DxSpider op Debian Wheezy

# Install Dx-Cluster

sudo apt-get install wget
sudo apt-get install git-core
sudo groupadd spider
sudo useradd -m sysop -G spider
sudo usermod -g spider sysop
sudo passwd sysop
sudo adduser sysop sudo

# Perl modules
sudo apt-get install libtimedate-perl
sudo apt-get install libnet-telnet-perl
sudo apt-get install libcurses-perl
sudo apt-get install libdigest-sha-perl
sudo apt-get install libdata-dumper-simple-perl

sudo su
cd ~sysop
ln -s /home/sysop/spider /spider
shutdown -r now

After restart login as sysop
cd ~
mkdir spider
git clone git://scm.dxcluster.org/scm/spider spider.new
cp -a /home/sysop/spider.new/.git /spider
rm -rf spider.new
cd /spider
git reset –hard
sudo su
cd /home/sysop/
chown -R sysop.spider spider
find . -type d -exec chmod 2775 {} ;
find . -type f -exec chmod 775 {} ;
exit
cd /spider
mkdir local
mkdir local_cmd
cp perl/DXVars.pm.issue local/DXVars.pm
cp perl/Listeners.pm local/Listeners.pm
cd local
mc
– edit DXVars.pm following the instructions in the comments
– edit Listeners.pm to remove “#” from the line for the port, and add additional ports as needed:
@listen = (
[“0.0.0.0”, 7300],
);

cd /spider/perl/
./create_sysop.pl
cd /tmp
wget http://ftp.w1nr.net/usdbraw.gz
# The next step can take a few minutes
/spider/perl/create_usdb.pl /tmp/usdbraw.gz
cd /spider/src
make
cd /spider/perl
./cluster.pl
# on a separate ssh or system console, log into the system as sysop
/spider/perl/console.pl
# from the command line of the console enter:
load/usdb # US database ?

# Edit /etc/inittab to add the following two lines at the end of the file.
##Start DXSpider on bootup and respawn it should it crash
DX:2345:respawn:/bin/su -c “/usr/bin/perl -w /spider/perl/cluster.pl” sysop >/dev/tty6

Add a line to /etc/services and /etc/inetd.conf for spider
/etc/services

# Local services
bpqspider 7400/tcp # BPQ to Spider Link

/etc/inetd.conf

sudo apt-get install openbsd-inetd

bpqspider stream tcp nowait sysop /spider/src/client client login ax25

Restart inetd – sudo killall -1 inetd