Jnos rewrite

Setup Jnos rewrite

# Handle local sysop, and sysop bulls
pd2lt@* pd2lt
pi1lap@* pd2lt
sysop pd2lt
sysop@pd2lt* pd2lt
sysop@* sysop
*@sysop sysop
###############

#
# Now pass specific bulletins on to our areas
tcpip@* tcpip
wanted@* wanted
want@* wanted
need@* wanted
sale@* sale
4sale@* sale
trade@* sale
swap@* sale
dx@* dx
amsat@* amsat
arrl@* arrl
nldnet@* nldnet
nld@* nldnet
ww@* ww
eu@* eu
latnet@* latnet
baycom@* baycom
#
*@amsat amsat
*@arrl arrl
*@arl arrl
*@ww ww
*@nldnet nldnet
*@eu eu
*@jpn jpn
*@ita ita
*@dl dl
*@gbr gbr
*@noord noord
*@vknet vknet
*@usa usa
*@nld nld
*@ww ww
*@lunet lunet
*@can can
*@ca ca
#
# Anything else means we must add more, above
*@* check

# Try to handle addressing mistakes by mbox users!
*/* check
*\* check
*&* check
*.* check
#
K

 

Jnos axip link

Setup Jnos axip link

# Attach AXIP to SV1CMG
attach axip cmg 256 44.154.142.2 sv1cmg-6
ifconfig cmg description "AXIP to LAMNOS:SV1CMG-6 Jnos"
ifconfig cmg ax25 maxframe 7
ifconfig cmg ax25 paclen 256
#
at 30 "mbox kick sv1cmg+"
#
arp eaves cmg on
arp poll cmg on
mbox mport cmg on

# sv1cmg
ax25 bc cmg on
ax25 heard cmg
ax25 hport cmg on
ax25 bcport cmg on

netrom  interface       cmg 203 201
netrom  bcpoll          cmg
netrom  bcnodes         cmg
inp     ifaces          cmg

trace cmg 0111

 

Jnos network interface

Setup a Jnos network Interface

attach tun tun0 1500 0
ifconfig tun0 ipaddress 44.137.31.67
ifconfig tun0 broadcast 44.137.31.95
ifconfig tun0 netmask 255.255.255.224
ifconfig tun0 mtu 1500
pause 2
shell ifconfig tun0 44.137.31.82 pointopoint 44.137.31.67 mtu 1500 up
pause 1
shell ip route add 44.137.31.67 dev tun0 table 44 src 44.137.31.82
shell echo 1 >/proc/sys/net/ipv4/ip_forward
pause 1
shell /usr/sbin/arp -i eth0 -Ds 44.137.31.67 eth0 pub

arp eaves tun0 on
arp poll tun0 on
arp maxq 10

ip hp tun0 on
route add default tun0 44.137.31.82

 

Linux commando “ps ax”

 2604 ?        S      0:00 /usr/bin/perl /usr/local/sbin/rip44d -p passwd -t 44
 2609 tty3     Ss+    0:01 ./jnos -C -g2 -u3 -f nos.cfg -i
 2610 ?        Ss     0:00 /bin/su -c /usr/bin/perl -w /spider/perl/cluster.pl sysop
 2704 ?        Ss     0:00 sh -c /usr/bin/perl -w /spider/perl/cluster.pl
 2705 ?        S      0:01 /usr/bin/perl -w /spider/perl/cluster.pl
 5007 ?        S      0:00 kissattach /dev/ttyUSB0 ax0
 5430 ?        S      0:00 kissattach /dev/ttyUSB1 ax1
 5494 pts/2    S+     0:00 listen -acirt
 5498 pts/1    S      0:00 kissnetd -p 2
 5505 ?        S      0:00 kissattach -l /dev/pts/3 ax2 44.137.31.73
 5516 pts/1    S      0:00 kissnetd -p 2
 5523 ?        S      0:00 kissattach -l /dev/pts/5 ax3 44.137.31.73
 5534 pts/1    S      0:00 socat -d -d -ly PTY,link=/dev/ttyq1 PTY,link=/dev/ptyq1
 5536 pts/1    S      0:00 slattach -s 38400 -p slip /dev/ptyq1
 5549 pts/1    S      0:00 socat -d -d -ly PTY,link=/dev/ttyq2 PTY,link=/dev/ptyq2
 5554 ?        S      0:00 kissattach -m 256 /dev/ptyq2 ax4 44.137.31.73
 5561 ?        S      0:00 ax25udp -c /etc/ax25/ax25ipd-10093.conf
 5564 pts/1    S      0:00 socat -d -d -ly PTY,link=/dev/ttyq3 PTY,link=/dev/ptyq3
 5569 ?        S      0:00 kissattach -m 256 /dev/ptyq3 ax5 44.137.31.73
 5574 ?        S      0:00 ax25ipd -c /etc/ax25/ax25ipd-axip.conf
 5579 pts/1    S      0:00 socat -d -d -ly PTY,link=/dev/ttyq4 PTY,link=/dev/ptyq4
 5585 ?        S      0:00 kissattach -m 256 /dev/ptyq4 ax6 44.137.31.73
 5606 pts/1    S      0:00 ./linuxnet
 5607 pts/1    S      0:00 ./rstatrxd /var/www/cgi-bin/postat/
 5616 ?        S      0:00 beacon -c PI1LAP-15 -t 10 -d ID ax3 Network node PI1LAP-15 Zeeland, JO11VN
 5617 ?        S      0:00 beacon -c PI1LAP-15 -t 10 -d ID ax2 Network node PI1LAP-15 Zeeland, JO11VN
 5618 ?        S      0:00 beacon -c PI1LAP-15 -t 10 -d ID ax0 Network node PI1LAP-15 Zeeland, JO11VN
 5619 ?        S      0:00 beacon -c PI1LAP-15 -t 10 -d ID ax1 Network node PI1LAP-15 Zeeland, JO11VN
 5620 ?        S      0:00 /usr/local/sbin/ax25d
 5622 ?        S      0:00 /usr/local/sbin/mheardd
 5624 pts/1    S      0:00 /usr/local/sbin/ax25rtd
 5626 ?        S      0:00 /usr/local/sbin/flexd
 5628 ?        S      0:00 /usr/local/sbin/netromd -c -i -p 1 -t 15
 5636 pts/1    S      0:00 /bin/bash /usr/local/sbin/fbb -s -a
 5638 pts/1    S      0:00 /usr/local/sbin/xfbbd -s -a

 

iptables allow traceroute / axip / rip protocol

#!/bin/bash
ipt="/sbin/iptables"
$ipt -P INPUT DROP
$ipt -P FORWARD DROP
$ipt -P OUTPUT ACCEPT
# Ampr.org
# Port 520 RIP,Routing protocol
$ipt -A INPUT -p udp --dport 520 -j ACCEPT
# Allow traceroute. Je moet de udp poort 33434 en 33523 niet droppen. Een reject is goed.
# Als je hem dropt wordt een traceroute niet mogelijk
$ipt -A INPUT -p icmp --icmp-type 8 -j ACCEPT
$ipt -A INPUT -p udp --dport 33434:33523 -j REJECT
# Proto 4 = IPv4 encapsulation / Proto 93 = ax.25 / Proto 94 = IPIP
# Hier wordt alles toegelaten van en naar het 44 netwerk.
# Wil je alleen het 44net toelaten
# $ipt –I INPUT –s ACCEPT –s 44.0.0.0/8 –d 44.0.0.0/8
#
$ipt -I INPUT -j ACCEPT -s 44.0.0.0/8 -d 0.0.0.0
$ipt -I INPUT -j ACCEPT -s 0.0.0.0 -d 44.0.0.0/8
$ipt -I FORWARD -j ACCEPT -s 44.0.0.0/8 -d 0.0.0.0/0
$ipt -I FORWARD -j ACCEPT -s 0.0.0.0/0 -d 44.0.0.0/8
$ipt -I INPUT -j ACCEPT --proto 4
$ipt -I INPUT -j ACCEPT --proto 93
$ipt -I INPUT -j ACCEPT --proto 94
$ipt -I FORWARD -j ACCEPT --proto 4
$ipt -I FORWARD -j ACCEPT --proto 94
$ipt -I FORWARD -j ACCEPT --proto 93

 

fbb start file for linux

Fbb start file

#! /bin/bash
### BEGIN INIT INFO
# Provides:          F6FBB Start-up
# Required-Start:    $remote_fs $syslog $network
# Required-Stop:     $remote_fs $syslog $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: FBB start up
# Description:       This script provides the start/stop control
#                    for the FBB BBS Packet Radio BBS.
### END INIT INFO

export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/etc/ax25:/usr/local/etc/ax25:/usr/local/xnet

base=${0##*/}
link=${base#*[SK][0-9][0-9]}

test $link = $base && START_FBB=yes
test "$START_FBB" = yes || exit 0
test -x /usr/local/sbin/fbb || exit 0

return="Done"
case "$1" in
start)
        echo "Starting FBB daemon "
        if [ -f /usr/local/etc/ax25/fbb/fbb.conf ] ; then
                /usr/local/sbin/fbb -s -a -l /etc/ax25/fbb.log || return=$rc_failed
        else
                echo  "/usr/local/etc/ax25/fbb/fbb.conf file not found"
                return="Failed"
        fi
        echo  " $1 $return"
        ;;
stop)
        echo "Shutting down FBB script"
        killall -KILL fbb || return="Failed"
        echo "Shutting down FBB daemon"
        killall -KILL xfbbd || return="Failed"
        sleep 4
        echo  " $1 $return"
        ;;
restart|reload)
        $0 stop && $0 start
        ;;
status)
        echo -n "Checking for FBB daemon: "
        PID=`/bin/pidof -x xfbbd`
        if [ -n "$PID" ]; then
                echo  "FBB is up"
         else
                echo "No FBB daemon"
        fi
        ;;


*)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
esac

exit 0

ax25 start file

Ax25 start file die ik gebruik voor pi1lap/pi8lap/pd2lt
(nog toe te voegen start/stop/status)

#!/bin/sh
# Start AX25/Netrom networking daemons.
# Script written and modified by Niels pd2lt
# Date of last modification: 03-11-2017

### BEGIN INIT INFO
# Provides:       ax25
# Required-Start: $network $remote_fs $syslog
# Required-Stop:  $network $remote_fs $syslog
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    AX25 server
### END INIT INFO

set +e   # Don't exit on error status

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/xnet:/usr/local/etc/ax25

DESC="AX25 server"

ENABLED=1

        modprobe mkiss
        modprobe ax25
        modprobe netrom
        modprobe rose


        # Dual port TNC KPC-9612
        mkiss -s 9600 -x 2 /dev/ttyUSB0 > /tmp/unix98
        export PTS0=`more /tmp/unix98 | grep -w /dev | cut -b -11`
        export PTS1=`more /tmp/unix98 | grep -w /dev | cut -b 12-`
        sleep 1
        # Port 1k2 144.850Mhz
        kissattach $PTS0 ax0 > /tmp/ax25-config.tmp
        awk '/device/ { print $7 }' /tmp/ax25-config.tmp > /tmp/ax25-config-tmp
        read Device < /tmp/ax25-config-tmp

        ifconfig $Device 44.137.31.73 netmask 255.255.255.224
        sleep 2
        # Port 9k6 430.950Mhz
        kissattach $PTS1 ax1 > /tmp/ax25-config.tmp
        awk '/device/ { print $7 }' /tmp/ax25-config.tmp > /tmp/ax25-config-tmp
        read Device < /tmp/ax25-config-tmp

        ifconfig $Device 44.137.31.73 netmask 255.255.255.224
        sleep 5

        # attach rose port
        rsattach rose0
        ifconfig rose0 44.137.31.73 netmask 255.255.255.224
        rsparms -call PI1LAP-10

        # link local pi8lap (xnet)
        tmpfile="/tmp/$$.startax2.pts"
        kissnetd -p 2 > "$tmpfile" &
        sleep 2
        attachthem () {
                read PTS1 PTS2
                kissattach -l $PTS1 ax2 44.137.31.73
                ifconfig ax2 44.137.31.73 netmask 255.255.255.224 up
                sleep 1
                sed -i "s,attach sdev3 kiss 3 1 19200 /dev/.*$,attach sdev3 kiss 3 1 19200 $PTS2," /usr/local/xnet/AUTOBOOT.NET
        }

        tail -n 1 $tmpfile | attachthem
        rm $tmpfile
        sleep 3

        # Link local pi1lap-4 (xnet)
        tmpfile="/tmp/$$.startax3.pts"
        kissnetd -p 2 > "$tmpfile" &
        sleep 2
        attachthem () {
                read PTS1 PTS2
                kissattach -l $PTS1 ax3 44.137.31.73
                ifconfig ax3 44.137.31.73 netmask 255.255.255.224 up
                sleep 1
                sed -i "s,attach sdev4 kiss 4 1 19200 /dev/.*$,attach sdev4 kiss 4 1 19200 $PTS2," /usr/local/xnet/AUTOBOOT.NET
        }

        tail -n 1 $tmpfile | attachthem
        rm $tmpfile
        sleep 3

        # create slip link Linux <-> Xnet
        socat -d -d -ly PTY,link=/dev/ttyq1 PTY,link=/dev/ptyq1 &
        sleep 2
                slattach -s 38400 -p slip /dev/ptyq1 &
                sleep 1
                ifconfig sl0 44.137.31.69 netmask 255.255.255.255 pointopoint 44.137.31.70 mtu 236 up
                sleep 1

        # create axudp device
        socat -d -d -ly PTY,link=/dev/ttyq2 PTY,link=/dev/ptyq2 &
        sleep 2
                kissattach -m 256 /dev/ptyq2 ax4 44.137.31.73
                ax25udp -c /etc/ax25/ax25ipd-10093.conf > /tmp/axudp
                ifconfig ax4 44.137.31.73 netmask 255.255.255.224 up
        sleep 1

        # create axip device
        socat -d -d -ly PTY,link=/dev/ttyq3 PTY,link=/dev/ptyq3 &
        sleep 2
                kissattach -m 256 /dev/ptyq3 ax5 44.137.31.73
                ax25ipd -c /etc/ax25/ax25ipd-axip.conf > /tmp/axip
                ifconfig ax5 44.137.31.73 netmask 255.255.255.224 up
        sleep 1

        # create socat device (jnos-uro)
        socat -d -d -ly PTY,link=/dev/ttyq4 PTY,link=/dev/ptyq4 &
        sleep 2
                kissattach -m 256 /dev/ptyq4 ax6 44.137.31.73
                ifconfig ax6 44.137.31.73 netmask 255.255.255.224 up
        sleep 1

        # MFnos running in DOSEmu
        # Set the comport in de file /etc/dosemu/dosemu.comf $_com1 = "dev/ttyq5"
        #socat -d -d -ly PTY,link=/dev/ttyq5 PTY,link=/dev/ptyq5 &
        #       slattach -n -q -p slip -s 38400 /dev/ptyq5 &
        #sleep 2
        # KISS inteface for MFnos / slip
        #       kissattach /dev/ptyq5 ax6 44.137.31.73
        #       kissparms -p ax6 -c 1 -f y -t 10 -s 100 -r 255
        #       axparms -setcall ax6 pi1lap-10
        #
        #       ifconfig ax3 44.88.0.9 netmask 255.255.255.224 up
        #sleep 2

        # create nr0 device (lapuro/pi1lap-5) uronode
                ifconfig nr0 down
                nrattach -i 44.137.31.73 -m 512 nr0
                ifconfig nr0 44.137.31.73 netmask 255.255.255.224 hw netrom PI1LAP-5 up

        # create nr1 device (lapbbs/pi8lap) f6fbb
                ifconfig nr1 down
                nrattach -i 44.137.31.73 -m 512 nr1
                ifconfig nr1 44.137.31.73 netmask 255.255.255.224 hw netrom PI8LAP up

        # create nr2 device (lapdx/pi1lap-4) dxspider
                ifconfig nr2 down
                nrattach -i 44.137.31.73 -m 512 nr2
                ifconfig nr2 44.137.31.73 netmask 255.255.255.224 hw netrom PI1LAP-4 up

        # create nr3 device (lappac/pi1lap-7) fpac
                ifconfig nr3 down
                nrattach -i 44.137.31.73 -m 512 nr3
                ifconfig nr3 44.137.31.73 netmask 255.255.255.224 hw netrom PI1LAP-7 up

        # start xnet
        cd /usr/local/xnet
        rm *.CFG &> /dev/null
        sleep 2
        ./linuxnet < /dev/tty2 > /dev/tty2 2>&1 &
        ./rstatrxd /var/www/cgi-bin/postat/ &> /dev/null &
        sleep 2

        # route
        # Xnet route
        ip route add 44.137.31.70 dev sl0 table 44 src 44.137.31.69
        # Mfnos route to 192.168.1.110
        #route add 44.137.31.75 gw 192.168.1.112

        # beacons
        beacon -c PI1LAP-15 -t 10 -d  ID ax0 "Network node PI1LAP-15 Zeeland, JO11VN" &
        beacon -c PI1LAP-15 -t 10 -d  ID ax1 "Network node PI1LAP-15 Zeeland, JO11VN" &
        beacon -c PI1LAP-15 -t 10 -d  ID ax2 "Network node PI1LAP-15 Zeeland, JO11VN" &
        beacon -c PI1LAP-15 -t 10 -d  ID ax3 "Network node PI1LAP-15 Zeeland, JO11VN" &

        # start ax25 deamons
        /usr/local/sbin/ax25d
        /usr/local/sbin/mheardd
        /usr/local/sbin/ax25rtd
        /usr/local/sbin/flexd
        /usr/local/sbin/netromd -c -i -p 1 -t 15
        fbb -s -a -l /etc/ax25/fbb.log

ax25ipd-axip.conf

On my system i use axip and axudp. I start ax25ipd twice with different configuration files.

Example for a axip port

Start
ax25ipd -c /etc/ax25/ax25ipd-axip.conf

# ax25ipd configuration file Axip
#
socket ip
mode tnc
mycall pi1lap-9
device /dev/ttyq3
speed 19200
#
# loglevel 0 - no output
# loglevel 1 - config info only
# loglevel 2 - major events and errors
# loglevel 3 - major events, errors, and AX25 frame trace
# loglevel 4 - all events
# log 0 for the moment, syslog not working yet ...
#
loglevel 2
broadcast NODES

route n1uro 44.x.x.x b
route pi1bdg 44.x.x.x b

 

ax25ipd-10093.conf

On my system i use axip and axudp. I start ax25ipd twice with different configuration files.

Example for a axudp port on 10093

Start
ax25ipd -c /etc/ax25/ax25ipd-10093.conf

# ax25ipd configuration file 10093 udp
#
socket udp 10093
mode tnc
mycall pi1lap-8
device /dev/ttyq2
speed 19200
#
# loglevel 0 - no output
# loglevel 1 - config info only
# loglevel 2 - major events and errors
# loglevel 3 - major events, errors, and AX25 frame trace
# loglevel 4 - all events
# log 0 for the moment, syslog not working yet ...
#
loglevel 2
broadcast NODES

route sv1cmg-4 44.x.x.x udp 1093 b
route pd2lt-8 44.x.x.x udp 10093 b