Ampr Gateway

Configuratie voorbeeld van een Ampr Gateway. Hier heb je het volgende programma(tje) voor nodig.
http://www.yo2loj.ro/hamprojects/ampr-ripd-1.15.tgz

Ik heb dit toegevoegd in het filetje /etc/rc.local zodat het bij het booten van het systeem automatische wordt geladen.

######################### tunnel ampr.org ################################
ifconfig tunl0 up 44.137.31.65/27 multicast
#ip tunnel change ttl 64 mode ipip tunl0
ip link set dev tunl0 up
################# default route naar gw-44-137.ampr.org ##################
ip route add default dev tunl0 via 213.222.29.194 onlink table 44
######################## route ampr.org #################################
ip rule add to 44.0.0.0/8 table 44 priority 44
ip rule add from 44.137.31.64/27 table 44 priority 45
route add -net 44.0.0.0 netmask 255.0.0.0 tunl0
ip route add 44.137.31.64/27 dev tunl0 table 44
## Start ampr-ripd to learn rest of mesh routes
/usr/sbin/ampr-ripd -r -s -i tunl0 -a (extern ip-adres) -t 44 -p (password)

Voor de rest heb ik nog wat regeltjes toegevoegd in de firewall. (de geleerde zullen er wel opmerkingen over hebben. Maar dit werkt voor mij)

-A INPUT -s 44.0.0.0/8 -j ACCEPT
# Block all non 44 incoming traffic
-A INPUT ! -s 44.0.0.0/8 -i tunl0 -j DROP
-A INPUT -i eth0 -p ipencap -j ACCEPT
-A INPUT -p udp --dport 520 -j ACCEPT
-A FORWARD -s 44.128.0.0/16 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -d 44.128.0.0/16 -j REJECT --reject-with icmp-port-unreachable
# Only allow ampr.org traffic ######
-A FORWARD -i tunl0 -o eth0 -s 44.0.0.0/8 -j ACCEPT
-A FORWARD -i eth0 -o tunl0 -d 44.0.0.0/8 -j ACCEPT
#####################################
-A FORWARD -d 44.0.0.0/8 -j ACCEPT
-A FORWARD -s 44.0.0.0/8 -j ACCEPT

Linbpq bpq32.cfg

Hier onder de configuratie die ik gebruik voor Linbpq.

/* 
Packet/Switch netwerk Kortgene. 
*/

LOCATOR=JO11VN
MAPCOMMENT=PI1LAP Network Node, Kortgene JO11VN

PASSWORD=**********

NODECALL=PI1LAP-15	; Node callsign
NODEALIAS=LAPNET ; Node alias (6 characters max)

IDMSG:
Winlink Gateway PI1LAP-10
***

BTEXT:				; UI broadcast text from BCALL to destination UNPROTO=
=5133.52N/00348.15En PI1LAP-15 Switch Node, BBS/APRS/AMPR/DXspider/RMS-(PI1LAP-10) Gateway. 
***

INFOMSG:			; The INFO command text follows:

PI1LAP LinBPQ Packet/Switch Node

Computer : Optiplex GX280
Software : Debian GNU/Linux 7 3.2.0-4-686-pae  / Linbpq 6.0.13.1
Rx/Tx    : Kenwood IC-F1010 / Yaesu FT7800
Modem    : Mfj 1278b / tnc7multi
Antenne  : X50n / X30n

Sysop Niels Ruiter

Ax25-mail   : pd2lt@pi8lap.#zl.nld.euro 
AMPR mail   : pd2lt@pi1lap.pd2lt.ampr.org
E-mail      : pd2lt@packet-radio.net

Have Fun
***
CTEXT:				; The CTEXT text follows:
Connected to PI1LAP-15.
Packet/Switch Node, Kortgene JO11VN 

RMS : Winlink packet Gateway
Dx  : Dxspider Cluster

LAPNET:PI1LAP-15} APP,RMS,DX,CHAT,C,B,I,N,R,P,U,V,S,MH
***			; Denotes end of CTEXT text

FULL_CTEXT=1		; 0=send CTEXT to L2 connects to NODEALIAS only
			; 1=send CTEXT to all connectees
OBSINIT=6		; Initial obsolescence set when a node is included
			; in a received nodes broadcast. This value is then
			; decremented by 1 every NODESINTERVAL.
OBSMIN=4		; When the obsolescence of a node falls below this
			; value that node's information is not included in
			; a subsequent nodes broadcast.
LogL4Connects=1
NODESINTERVAL=15	; Nodes broadcast interval in minutes
IDINTERVAL=10		; 'IDMSG' UI broadcast interval in minutes, 0=OFF
BTINTERVAL=60		; The BTEXT broadcast interval in minutes, 0=OFF
L3TIMETOLIVE=25		; Max L3 hops
L4RETRIES=3		; Level 4 retry count
L4TIMEOUT=60		; Level 4 timeout in seconds s/b > FRACK x RETRIES
L4DELAY=10		; Level 4 delayed ack timer in seconds
L4WINDOW=4		; Level 4 window size
MAXLINKS=63		; Max level 2 links
MAXNODES=1024		; Max nodes in nodes table
MAXROUTES=128		; Max adjacent nodes
MAXCIRCUITS=1024	; Max L4 circuits
MINQUAL=100		; Minimum quality to add to nodes table
; INP3 Routing is experimental.  The two parms which follow will be ignored
; unless activated in the ROUTES: section.
MAXHOPS=10		; INP3 hop limit to add to tables
MAXRTT=90		; INP3 max RTT in seconds
BUFFERS=255		; Packet buffers - 255 means allocate as many as
			; possible, normally about 130, depending upon other
			; table sizes.

; TNC default parameters:

PACLEN=128		; Max packet size (236 max for net/rom)
; Level 2 Parameters:
; T1 (FRACK), T2 (RESPTIME) and N2 (RETRIES) are now in the PORTS section
T3=120			; Link validation timer in seconds
IDLETIME=10000		; Idle link shutdown timer in seconds

; Configuration Options:

AUTOSAVE=1		; Saves BPQNODES.dat upon program exit
BBS=1			; 1 = BBS support included, 0 = No BBS support
NODE=1			; Include switch support
HIDENODES=1		; If set to 1, nodes beginning with a #
			; require a 'N *' command to be displayed.

; The *** LINKED command is intended for use by gateway software, and concern
; has been expressed that it could be misused. It is recommended that it be
; disabled (=N) if unneeded.

ENABLE_LINKED=A		; Controls processing of *** LINKED command
			; Y = allows unrestricted use
			; A = allows use by application program
			; N = disabled

; Port Definitions:

PORT
 PORTNUM=1			; Optional but sets port number if stated
 ID=144.850Mhz		        ; Displayed by PORTS command
 TYPE=ASYNC			; Port is RS232 Com
 PROTOCOL=KISS			; TNC is used in KISS, JKISS or BPQKISS mode
 FULLDUP=0			; Only meaningful for KISS, JKISS or BPQKISS devices
 COMPORT=/dev/ttyUSB0
 SPEED=9600			; RS232 COM PORT SPEED
 CHANNEL=A			; A for single channel TNC, A or B for multichannel
 NOKEEPALIVES=0
 PERSIST=160			; PERSIST=256/(# of transmitters-1)
 SLOTTIME=180			; CMSA interval timer in milliseconds
 TXDELAY=180			; Transmit keyup delay in milliseconds
 TXTAIL=23			; TX key down, in milliseconds, at packet end
 QUALITY=192			; Quality factor applied to node broadcasts heard on
				; this port, unless overridden by a locked route
				; entry. Setting to 0 stops node broadcasts
 MINQUAL=100			; Entries in the nodes table with qualities greater or
				; equal to MINQUAL will be sent on this port. A value
				; of 0 sends everything.
 MAXFRAME=4			; Max outstanding frames (1 thru 7)
 FRACK=5000			; Level 2 timout in milliseconds
 RESPTIME=1000			; Level 2 delayed ack timer in milliseconds
 RETRIES=25			; Level 2 maximum retry value
 PACLEN=128			; Default max packet length for this port
 UNPROTO=APBPQ1,PI1LAP       ; BTEXT broadcast addrs format: DEST[,digi1[,digi2]]
 BCALL=PI1LAP-15   		; BTEXT call. unstated defaults to APPL1CALL
 L3ONLY=0			; 1=No user downlink connects on this port
 DIGIFLAG=1			; Digipeat: 0=OFF, 1=ALL, 255=UI Only
 DIGIPORT=0			; Port on which to send digi'd frames (0 = same port)
 USERS=0			; Maximum number of L2 sessions, 0 = no limit
ENDPORT

PORT
 PORTNUM=2                     ; Optional but sets port number if stated
 ID=430,950MHz            ; Displayed by PORTS command
 TYPE=ASYNC                    ; Port is RS232 Com
 PROTOCOL=KISS                 ; TNC is used in KISS, JKISS or BPQKISS mode
 FULLDUP=0                     ; Only meaningful for KISS, JKISS or BPQKISS devices
 COMPORT=/dev/ttyUSB0
 SPEED=9600                   ; SERIAL PORT SPEED, NOT RADIO DATA SPEED.
 CHANNEL=B                     ; A for single channel TNC, A or B for multichannel
 PERSIST=255                   ; PERSIST=256/(# of transmitters-1)
 SLOTTIME=100                  ; CMSA interval timer in milliseconds
 TXDELAY=300                   ; Transmit keyup delay in milliseconds
 TXTAIL=30                     ; TX key down, in milliseconds, at packet end
 QUALITY=192                    ; Quality factor applied to node broadcasts heard on
                                ; this port, unless overridden by a locked route
                                ; entry. Setting to 0 stops node broadcasts
                                ; With QUALITY=0, the value of MINQUAL is irrelevant
 MINQUAL=100                   ; Entries in the nodes table with qualities greater or
                                ; equal to MINQUAL will be sent on this port. A value
                                ; of 0 sends everything.
 MAXFRAME=4                    ; Max outstanding frames (1 thru 7)
 FRACK=5000                    ; Level 2 timout in milliseconds
 RESPTIME=1000                 ; Level 2 delayed ack timer in milliseconds
 RETRIES=25                     ; Level 2 maximum retry value
 PACLEN=128                    ; Default max packet length for this port
 UNPROTO=APBPQ1,PI1LAP         ; BTEXT broadcast addrs format: DEST[,digi1[,digi2]]
 BCALL=PI1LAP                   ; BTEXT call. unstated defaults to APPL1CALL
 L3ONLY=0                      ; 1=No user downlink connects on this port
 DIGIFLAG=1                    ; Digipeat: 0=OFF, 1=ALL, 255=UI Only
 DIGIPORT=0                    ; Port on which to send digi'd frames (0 = same port)
 USERS=0                       ; Maximum number of L2 sessions, 0 = no limit
ENDPORT


; AX/IP/UDP port definition.

PORT
 PORTNUM=3		; Optional but sets port number if stated
 ID=AX/IP/UDP		; Displayed by PORTS command
 DRIVER=BPQAXIP		; Uses BPQAXIP capability of bpq32.dll
 QUALITY=255		; Quality factor applied to node broadcasts heard on
			; this port, unless overridden by a locked route
			; entry. Setting to 0 stops node broadcasts
 MINQUAL=192		; Entries in the nodes table with qualities greater or
			; equal to MINQUAL will be sent on this port. A value
			; of 0 sends everything.
 MAXFRAME=7		; Max outstanding frames (1 thru 7)
 FRACK=3000		; Level 2 timout in milliseconds
 RESPTIME=1000		; Level 2 delayed ack timer in milliseconds
 RETRIES=5		; Level 2 maximum retry value
 PACLEN=236		; Max = 236

CONFIG			; BPQAXIP.cfg has been deprecated.  Instead the AXIP
			; configuration occurs here:
 MHEARD ON		; Opens AXIP MHEARD window
 UDP 10094		; Listens for UDP packets on this UDP port number
; UDP 93			; Listens for UDP packets on this UDP port number
; AUTOADDMAP		; This option automatically adds the node call and
			; address of a node for which you do not have a
			; pre-arranged fixed entry in bpqaxip.cfg.  If the 
			; option DONTCHECKSOURCECALL is specified then the
			; AUTOADDMAP option is ignored.
 BROADCAST NODES
 BROADCAST QST

MAP PI1SNK ip-adres pi1snk UDP 10094
MAP PI1DXC-15 ip-adres pi1dxc UDP 93 B
MAP PI1DEC-14 ip-adres pi1dec UDP 93
MAP PI1LAP ip-adres link local UDP 93 B

ENDPORT

; Radio port definitions.

PORT
 PORTNUM=4			; Optional but sets port number if stated
 ID=Telnet
 DRIVER=Telnet
 PORTCALL=PI1LAP-10

CONFIG
 CMS=1
 CMSCALL=PI1LAP
 CMSPASS=********
 LOGGING=1
 DisconnectOnClose=1
 CMDPORT 7400 63000
 TCPPORT=6323
 FBBPORT=6300
 HTTPPORT=9180
 LOGINPROMPT=User:
 PASSWORDPROMPT=Password:
 MAXSESSIONS=10
 CTEXT=Welcome to PI1LAP`s Telnet Server.\nPress ? For list of commands \n\n
 USER=pd2lt,********,PD2LT,,SYSOP
 USER=pd2nlx,*******,PD2NLX,,SYSOP
ENDPORT

PORT
 PORTNUM=5
 ID=LOOPBACK
 TYPE=INTERNAL
 PROTOCOL=KISS
 CHANNEL=A
 QUALITY=255
 MAXFRAME=6
 FULLDUP=0
 FRACK=10000
 RESPTIME=3000
 RETRIES=10
 PACLEN=200
 TXDELAY=500
 SLOTTIME=100
 PERSIST=64
 DIGIFLAG=1
 UNPROTO=APBPQ1,PI1LAP-11
 BCALL=PI1LAP-15
ENDPORT


PORT
 PORTNUM=6
 ID=Link tnn
 TYPE=ASYNC
 PROTOCOL=KISS
 QUALITY=255
 COMPORT=/dev/com6
 CHANNEL=A
 SPEED=9600
 MAXFRAME=7
 FRACK=5000
 RESPTIME=1000
 RETRIES=10
 PACLEN=128
ENDPORT

;PORT
; PORTNUM=7
; ID=Link RMS
; TYPE=ASYNC
; PROTOCOL=KISS
; QUALITY=255
; COMPORT=/dev/com7
; CHANNEL=A
; SPEED=9600
; MAXFRAME=6
; FRACK=5000
; RESPTIME=1000
; RETRIES=10
; PACLEN=236
;ENDPORT



ROUTES:				; Locked routes (31 maximum)
; CALLSIGN,QUALITY,PORT[,MAXFRAME,FRACK,PACLEN,INP3Enable]
PI1SNK,1,3,1,0,0,1
PI1DXC-15,255,3
PE1PLM-14,192,1
PI1LAP,1,1,0,0,0,1		; BPQ AX/UDP on Multiple_Apps System
***					; Denotes end of locked routes
;
IPGATEWAY

Adapter eth0                   # Linux

44ENCAP 192.168.1.220          # Enable AMPRNET Tunnels and RIP44
IPAddr 44.137.31.70            # IP address of BPQ32
IPNetmask 255.255.255.224      # Netmask 
IPPorts 1,3                # BPQ Ports to be used for links to IP systems. List of ports, separated by commas

;NAT 44.137.31.66 192.168.1.238   # inet.pd2lt.ampr.org (www,ftp)
;NAT 44.137.31.81 192.168.1.222	 # hamnet.pd2lt.ampr.org (hamnet access)
;NAT 44.137.31.67 192.168.1.112	 # jnos.pd2lt.ampr.org (jnos)
;NAT 44.137.31.67 192.168.1.222   # aprs.pd2lt.ampr.org (aprsc server)
;NAT 44.137.31.69 192.168.1.213	 # sys1.pd2lt.ampr.org (windows 7)

;ARP 44.131.31.67 PI1LAP-2 1 D     # 44.131.56.6 is reachable over radio port 1
;ARP 44.137.31.67 PI8LAP-1 1 D
;ARP 44.147.31.67 PI1LAP-14 3 D
ARP 44.137.56.106 PI1SNK 3 D     # ARP entry for Gateway below
ROUTE 44.137.56.0/22 44.137.56.106 # All subnet 44.131.11.0/29  is reachable over radio link 1 to GM8BPQ-7

route addprivate 44.137.31.64/27 encap 82.176.25.213  # AMPRNET Tunnel route
;route addprivate 44.137.31.72/29 encap 149.210.235.143 # Link vpn ipip tunnel vpn-server
;route addprivate 44.137.31.89/29 encap 149.210.215.162 # Link www server tunnel vps
*****

APRSDIGI

 APRSCall=PI1LAP-11
 StatusMsg=PI1LAP-11 APRS Digi  RX-only .

 Symbol=&         ; Icon to display for station.
 Symset=I         ; This is a "B" in a Red Diamond. 

 ;
 ;    Specify a Dest Addreess and Path for each port you want to use for APRS. No dest means receive only port
 ;    Ports without an APRSPath statement will not be used by the Digi
 ;
 ;    Note if you specify APRS as the destination call it will be replaced by the current BPQ32 APRS
 ;    identification destination - APBPQ1. If you really want to send APRS, specify APRS-0. 
 
  ;APRSPath 2=APRS                         ; Receive only port
  APRSPath 1=APRS,WIDE1-1,WIDE2-1             ; Dest and up to 8 digis
;  APRSPath 2=APRS,WIDE1-1,WIDE2-1
  APRSPath 5=APRS,WIDE1-1,WIDE2-1
  
  BeaconInterval=20                   ; Send Beacon every 30 minute. Minimum is 5 mins
  MAXAGE=120
  MobileBeaconInterval=2              ; Beacon interval when moving

 ;    Define Crossport Digi. For each port, a list of ports to send a packet to (IS means send to APRS-IS)
 ;    If a Digimap isn't specified for a port, digi out on the port the packet arrived on,
 ;        and send to APRS-IS (if enabled)
 ;    If you want to digi on same port, but not send to APRS-IS, Specify Digimap n=n 
 ;    If you dont want to digi on a port, specify Digimap n=
 ;
 ;    If you only have one APRS port, you probably don't need a Digimap statement

 
 Digimap 1=1,IS            ; Packets from 1 to 9, but not APRS-IS
 Digimap 5=5,IS       ; Packets from 7 to 7, 9 and APRS-IS
; Digimap 2=2,IS
 
 ;    Define Digipeating parameters
 
 TraceCalls=WIDE,TRACE  ; Calls for CALLN-n Processing with Trace
 FloodCalls=NLD         ; Calls for CALLN-n Processing without Trace
 DigiCalls=ZLD         ; Calls for Normal (ie no SSID manipulation) Digi
                        ; For a Local "Fillin" Digi, you could include WIDE1-1 and leave out TraceCalls and FloodCalls
						
;ReplaceDigiCalls       ; Replace DigiCalls with APRSCall. Omit if you want the call to be left as it is received.
						
 MaxTraceHops=2         ; Max value of n in CALLN-n processing. If a packet is received with n greater than
 MaxFloodHops=2         ; this, the value will be replaced BEFORE it is decremented.

 ;    Specify position. You can specify a fixed LAT/LONG, or use GPS

 LAT=5133.52N           ; Must be in standard APRS Format (ddmm.mmN/S)
 LON=00348.15E          ; Must be in standard APRS Format (dddmm.mmE/W)

 ;GPSPort=/dev/ttyUSB1              ; if specified, lat/lon will be taken from a GPS,
 ;GPSSpeed=4800             ; overriding the values set above.


 ; The Digi can generate Object and Item reports. 
 ; The format is pretty strict - a single space between param=value pairs,
 ; a comma but no spaces in PATH and PORT string.
 ; Minimum interval is 10 mins. You can have as many OBJECT lines as you need.
 ; See thr APRS specification for information on how to format an Object or Item string.

 OBJECT PATH=APRS,WIDE1-1,WIDE2-1 PORT=1,IS INTERVAL=10 TEXT=PI1LAP*111111z5133.52N/00348.15EIPI1LAP Switch Node, BBS/APRS/AMPR/DXspider/RMS-(PI1LAP-10) Gateway.

 ; IGATE Params. If specified you will gate RF packets and your beacons to APRS-IS

 ISHost=194.109.192.235    ; APRS-IS Host Name. May be either an IPV4 or an IPV6 Host
 ISPort=14580              ; Normal port for a filtered feed
 ISPasscode=*******              ; If you don't already have a passcode I can issue you one.
 ;
 ; You can specify a filter command to be sent when you log on to APRS-IS. Normally you don't
 ; need one. The APRS Mapping Application (BPQAPRS) sets a filter when it starts,
 ; and if you aren't running an APRS application, there isn't much point in getting info from APRS-IS
 ;
 ISFilter=m/500              ; Filter Command if needed

; Bridge 1=6
; Bridge 6=1

****

LINMAIL
LINCHAT

APPLICATION 1,BBS,,PI8LAP,LAPBBS,255
APPLICATION 2,CHAT,,PI1LAP-6,LAPCHT,255
APPLICATION 3,RMS,C 4 CMS,PI1LAP-10,LAPRMS,255
APPLICATION 4,DX,C 4 HOST 0 S,PI1LAP-4,LAPDX,255
APPLICATION 5,APP,C 4 HOST 1 S
APPLICATION 6,TNN,C 6 PI1LAP,255
APPLICATION 32,SYSOP

Jnos autoexec.nos

Here the autoexec.nos I use with a the Katronics KPC-9612

# Enable JNOS to log events to dated files in /jnos/logs directory
#
log on
#
# Maximize TCP performance for standard LAN having MTU 1500
#
tcp mss 1460
tcp window 5840
tcp timert linear
tcp irtt 5500
tcp maxw 9000
tcp bl 2
tcp ret 12
tcp win 2048
tcp syn on
tcp maxwait 30000
tcp retries 5
#
icmp echo on
icmp trace 2
ip ttl 225
ip rt 4
#
ip address 44.137.31.67
#
# Hostname and default ax25 call
#
hostname jnos.pd2lt.ampr.org.
ax25 mycall PI8LAP-1
ax25 bbs PI8LAP
ax25 alias LAP
ax25 ttycall PD2LT
#
# SETUP TUN0
#=============
# Create a network interface. This allows us to talk to the linux
# box on which JNOS is running - and in turn - to the internet.
#
attach tun tun0 1500 0
#
ifconfig tun0 ipaddress 44.137.31.67
ifconfig tun0 mtu 1500
#
pause 1
#
# JNOS creates the TUN device, so JNOS needs to do some post configuration,
# by shelling out to the linux command line and running 'ifconfig' command.
#
shell ifconfig tun0 44.137.31.66 pointopoint 44.137.31.67 mtu 1500 up
pause 3
shell ip route add 44.137.31.67 dev tun0 table 44 src 44.137.31.66
shell /usr/sbin/arp -i eth0 -Ds 44.137.31.67 eth0 pub
#
# ROUTE
#============
route add default tun0 44.137.31.66
ip hp tun0 on
# APRS route add
#ax25 route add apz200 uhf (call) (call)
#ax25 route add apz200 vhf (call) (call)
#ax25 route add id uhf (call) (call)
#ax25 route add id vhf (call) (call)
#
# SETUP AMPRGW
#==============
#ifconfig encap ipaddress 44.137.31.33 
#ifconfig encap mtu 1500
#source encap.txt
#pause 1
#ip upstairs 224.0.0.9
#rip ttl 43200
#start rip
#rip accept 44.0.0.1
#rip merge off
#rip trace 9 rip.log 
#
# AXIP/AXUDP
#==============
# Attach AXIP wormhole to a remote system
#
#attach axip axi0 256 44.137.31.34
#ifconfig axi0 description "axip wormhole"
#
# Attach AXUDP wormhole to a remote system
# Delay Domain lookup only works after autoexec.nos is fully loaded
#
#at now+0001 "attach axudp axip 256 info.xs4all.nl AXIP 93 93"
#at now+0002 "ifconfig axip description \"axudp link (call)\""
pause 2
#
# AXUDP BCM
#==============
#attach axudp bcm 256 192.168.1.130 BCM 95 95
#ifconfig bcm description "link to my bbs (mailbox)"
#
# ACCESS CONTROL
#===============
#Allow a specific IP access
#at now+0001 "tcp access permit info.xs4all.nl all"
tcp access permit 127.0.0.1 all
tcp access permit 44/8 all
tcp access permit 44.137/32 all
tcp access permit 44.137.31.64/27 all
tcp access permit 192.168.1.0/24 all
tcp access permit 82.176.45.213 all
# blacklist bad logins for 15 minutes (900 seconds)
mbox blacklist 900
# run expiry process every 20 minutes
tcp access expiry 20
tcp clean
#
# RF PORTS
#=================
# KPC9612 dual port tnc
#
attach asy ttyUSB0 - ax25 vhf 4096 256 9600
attach kiss vhf 1 uhf
pause 5
# Port VHF
ifconfig vhf description "vhf 1200 baud port 144.950mhz"
ifconfig vhf ipaddr 44.137.31.67 netmask 0xfffffff0 broadcast 44.137.31.95
ifconfig vhf ax25 bct "PI8LAP Jnos Packet BBS/Gate (linux)."
param vhf 1 35
param vhf 2 256
param vhf 3 10
param vhf 4 5
param vhf 5 0
param vhf TxDelay 25
# Port UHF
ifconfig uhf description "uhf 9600 baud port 430.950mhz"
ifconfig uhf ipaddr 44.137.31.67 netmask 0xfffffff0 broadcast 44.137.31.95
ifconfig uhf ax25 bct "PI8LAP Jnos Packet BBS/Gate (linux)."
param uhf 1 35
param uhf 2 256
param uhf 3 10
param uhf 4 5
param uhf 5 0
param uhf TxDelay 25
#
ip hsize 10
ip hp vhf on
ip hp uhf on
#
#
# DOMAIN
#================
domain suffix ampr.org.
domain ret 2
domain maxw 60
#domain addserver 192.168.1.1
domain addserver 44.137.0.1
domain cache clean on
domain cache wait 3300
#domain cache size 15
domain upd on
domain translate no # Turning this on causes severe delays :-(
domain verbose yes
domain dns on
domain ttl 500000
#domain trace on
#
# MAILBOX
#================
mbox haddress pi8lap.#zld.nld.euro
mbox mailfor watch pd2lt pi1lap pi8lap
mbox maxusers 25
mbox winlinkcall PI1LAP
mbox mport vhf on
mbox mport uhf on
#mbox mport axip on
mbox newmail on
mbox smtp on
mbox attend off
mbox sendquery on
mbox header on
mbox show on
mbox fbb 2
mbox mailfor 300
#mbox showalias off
mbox smtptoo off
mbox nobid off
mbox timer 0
mbox td 2300
mbox password ********
mbox qth Kortgene
mbox register on
mbox tdisc 300
mbox tmsg "Welcome to the Jnos BBS/Node/Gateway/Winlink system!\nUse callsign for Login and any Password."
motd "Welcome to the jnos.pd2lt.ampr.org, Packet gateway.\nType 'reg' to get registered.\nType 'i' for info."
#prompt on
third on
bulletin check on
bulletin return on
bulletin date on
bulletin loop 2
#
# FORWARDING 5 min/h
#======================
at 05 "mbox kick Wl2k+"
#
# ARP SETTINGS
#=============
arp eaves tun0 on
arp eaves vhf on
arp eaves encap on
arp eaves uhf on
arp poll tun0 on
arp poll vhf on
arp poll encap on
arp poll uhf on
arp maxq 10
#arp add 44.137.31. ax25 qst-0 vhf
#arp add 44.137.31.33 ax25 qst-0 uhf
#apr add 44.137.31.33 ax25 qst-0 axip
#
# RDate SERVER
#==============
#
#at now+0001 "rdate server time.nist.gov"
#rdate server 44.137.0.1
#rdate server 44.137.31.66
#
# AX25 SETUP
#==============
ax25 bctext "PI8LAP/PI1LAP Jnos Packet BBS/Gateway (Linux)"
ax25 maxf 2
ax25 timert linear
ax25 version 2
ax25 win 2048
ax25 pacl 128
ax25 bcinterval 600
ax25 ret 12
ax25 irtt 2500
ax25 maxw 7000
ax25 blimit 3
ax25 hsize 50
ax25 heard vhf
ax25 heard uhf
#ax25 heard axip
ax25 hport vhf on
ax25 hport uhf on
#ax25 hport axip on
ax25 bcport vhf on
ax25 bcport uhf on
#ax25 bcport axip on
#
# NETROM
#==================
attach netrom
 
netrom alias LAPNOD
netrom call PI1LAP
netrom interface vhf 192 143            # 90- at end - broadcast qty >=90
netrom interface uhf 192 143 
#netrom interface axip 192 143
ifconfig netrom tcp blimit 3
ifconfig netrom tcp irtt 300000
ifconfig netrom tcp maxwait 900000
ifconfig netrom tcp mss 216
ifconfig netrom tcp retries 25
ifconfig netrom tcp timertype linear
ifconfig netrom tcp window 432
 
netrom nodefilter mode none
netrom acktime 100                      # Ack delay timer in mSecs
netrom choketime 60000
netrom derate on
netrom hidden ON                        # ON - show nodes who start with

netrom irtt 8000
#netrom quality 254                        # set the initial round trip time
netrom minquality 143                   # Min qty for recognizing a node
netrom nodetimer 3600                   # broadcast routing table in sec
netrom obsotimer 1200                   # table entry remain alive sec*6
netrom promiscuous on
netrom qlimit 2048
netrom retries 5
netrom timertype linear
netrom ttl 18
netrom g8bpq on
netrom bcpoll vhf
netrom bcpoll uhf          
#netrom bcpoll axip
netrom bcnodes vhf
netrom bcnodes uhf
#netrom bcnodes axip
#
#netrom route add alias call port 255 call
#netrom connect (call)
# 
# SMTP
#===================
smtp mode route
smtp quiet on
smtp maxclients 25
#smtp maxservers 25
smtp batch on
smtp t4 300 
smtp tdisc 920
smtp timer 920
#smtp trace 1
smtp use on
#
# NOSAPRS
#==================
aprs log /jnos/spool/log/aprs.log
aprs interface vhf
aprs interface uhf
#
##aprs logon call PI1LAP-10
#
# I want the APRS Internet System to only send me traffic
# for stations that are within 300 KM, of my location. In my
# case, the city of Winnipeg is roughly 49d54m (Latitude)
# and -97d7m (Longitude).
#
##aprs logon filter r/51.3352/3.4815/50
#
# Configure the Position and Status texts that are broadcast
# out to the APRS Internet System (APRS IS).
#
aprs bc stat "Jnos inet gateway on 144.850Mhz"
aprs bc pos "5133.52NI00348.15E&JNOS jnos.pd2lt.ampr.org 44.137.31.67"
aprs bc timer 1440
#
# Configure the Position and Status texts that are broadcast out
# the default APRS RF port (set by the aprs interface command).
#
aprs bc rfstat "Jnos inet gateway"
aprs bc rfpos "5133.52NI00348.15E&JNOS jnos.pd2lt.ampr.org 44.137.31.67"
aprs bc rftimer 30
#
# I don't use WX - following for development purposes only
#
#aprs wx call ve4klm-11
#aprs wx stat "Weather Station - Crestview District"
#aprs wx pos "4953.22N/09718.35W_"
#aprs wx data "/tmp/wx.data"
#aprs wx timer 30
#
# Heard table 
#
aprs hsize 10
#
# Stuff for the 14501 status page
#
aprs contact m "pd2lt@pd2lt.ampr.org"
aprs locator "http://map.findu.com/"
#
# Connection to APRS internet system
#
aprs server add 194.109.192.235 14580
#aprs server add 44.137.31.38 14580
#aprs server add 165.91.119.60 1314
#
# Potential APRS Clients
#
#aprs client add 44.135.124.62 14825
#
# IF you want to gate traffic to RF - BE VERY CAREFULL
# with these filters. You don't want to FLOOD your local
# frequencies with solid traffic. You've been warned !!
#
#aprs calls fwdtorf VE4 VA4 VE3JJ VE3HDU
#aprs calls postorf VE4 VA4 VE3JJ VE3HDU
#aprs calls stattorf VE4 VA4 VE3JJ VE3HDU
#aprs calls wxtorf VE4 VA4 S VE3JJ VE3HDU
#
# This next entry gives specific IP address(s) permission to use the
# browser based APRS message center to it's full capacity. By default,
# the message center allows READ-ONLY access (ie, you can't send).
#
#aprs calls ip45845 A.B.C.D X.Y.Z.Z
#
aprs email local
#
# Activate the core NOSaprs service
aprs listen on
#
# If you want the NOSaprs status page to be available,
# for example, 'http://localhost:14501'.
start aprs 14501
#
# If you want the NOSaprs browser based message center
# for example, 'http://localhost:14845'.
start aprs 45845
#
# CONVERSE BRIDGE 
#===================
#conv host lap 
conv mycall pi1lap-6
conv interface vhf on
conv interface uhf on
conv interface tun0 on
conv interface encap on
#conv setinfo on
conv channel 137
chnl 137 is Nederland  
#conv link 192.168.1.222
#
# HTTP SERVER
#===================
start http 80 /wwwroot
#http absinclude on
#http maxcli 15
#http multihomed on
#http simult 15
#http tdisc 180
#
# FTP SERVER
#===============
ftptdisc 300
ftype B
ftpclzw on
ftpslzw on
ftpmaxservers 15
#
#
# START
#===============
start ax25
start telnet
start smtp
start finger
start pop
start ttylink
start netrom
start ftp
start convers
start forward
strace on
trace tun0 0111
#trace vhf 0111
#trace uhf 0111
#trace axip 0111
#
# expire messages each night at 1 a.m.
at 0100 "expire 24"
#delete old bid's every night at 2 a.m., limit is 31 days 
at 0200 "oldbid 24 31"
#
echo "********** Start the engines ************"
echo "*         jnos.pd2lt.ampr.org           *"
echo "*      pd2lt@pi8lap.#zl.nld.euro        *"
echo "*         Linux / Jnos Power            *"
echo "* Debian 3.2.68-1+deb7u3 i686 GNU/Linux *"
echo "*  POP/SMTP/FTP/CONV/BBS/AXIP/NETROM    *"
echo "*****************************************"

(X)Net autoexec.net

 

#### Hier worden de services gestart ####
#
#### Start the router
start routed
#### Start beacond
start beacond
#### Ping-Pong convers
#start conversd pi1lap-4
#### ONLINE-PortStatistieks
start postatd
pos * # port statistieks voor alle poorten
#### Start crond zie file crontab
start crond
#### CALL-Check starten / Zie file callchk.net - suspend.txt
start callchkd 100
# Name server - Router
names 192.168.1.1
# Time server
ntpdate 217.77.132.1
#### Beacons pi1lap
BEACON A 600 0 ID text PI1LAP:xn_lap - ((X)NET) Ax25 - Net/ROM node.
BEACON A 600 1 ID text PI1LAP:xn_lap - ((X)NET) Ax25 - Net/ROM node.
#
my call pi1lap
my alias xn_lap
my tcall pd2lt
my prompt pi1lap ==>

(X)Net autoboot.net

 

#### Autoboot.net Hier komen de attach commandos. ####

#### Ax25 kiss poorten
attach sdev0 kiss 0 1 9600 /dev/ttyUSB0 # 2m
attach sdev1 kiss 1 1 9600 /dev/ttyUSB1 # 70cm
#attach sdev2 kiss 2 1 9600 /dev/ttyUSB2 # hf
attach sdev3 kiss 3 1 115200 /dev/pts/2
attach sdev4 kiss 4 1 115200 /dev/pts/4
#attach sdev5 kiss 5 1 19200 /dev/com8  # Cluster
#### AXIP - Ports
# Link pi1lap
#attach ip0 axudp 0 1 l10093 d93 (ip-adres link local)
# Link pi1dxc-15
attach ip0 axudp 6 1 l93 d93 (ip-adres pi1dxc)
# Link pi1snk
attach ip1 axudp 7 1  l93 d93 (ip-adres pi1snk)
# Link pi1dec-14
attach ip2 axudp 8 1 l93 d10093 (ip-adres pi1dec)
# Link pi1bdg
attach ip3 axudp 9 1 l93 d10093 (ip-adres pi1bdg)
# Link pi1cdr
attach ip4 axudp 10 1 l93 d93 (ip-adres pi1cdr)
#
#### Slip port
attach sdev6 slip 38400 /dev/pts/6

#po 0 baud 115200
#po 0 dup 0
#po 0 win 7
#po 0 quality 255
#po 0 name pi1lap
#r bc ad 0 pi1lap
#r bc ad 0 nodes

#### 2m
po 0 acon 1 
po 0 baud 1200
po 0 dup 0
po 0 win 4
po 0 dama 0
po 0 quality 192
po 0 name 2m-1k2
#r bc ad 0 pe1plm-14
#r bc ad 0 nodes
#### 70cm
po 1 acon 1
po 1 baud 1200
po 1 dup 0
po 1 win 4
po 1 dama 0
po 1 quality 192
po 1 name 70cm-1k2
#r bc ad 1 pe1plm-14
#r bc ad 1 nodes
#### HF
#po 2 baud 9600
#po 2 dup 1
#po 2 win 2
#po 2 quality 0
#po 2 name hf
#### F6fbb bbs
po 3 baud 115200
po 3 dup 0
po 3 win 4
po 3 name pi8lap
#### Convers
#po 4 acon 1
po 4 baud 115200
po 4 dup 0
po 4 win 4
po 4 name pi8lap-8
#r bc ad 1 pi1lap-15
#r bc ad 1 nodes
#### Cluster
#po 5 baud 19200
#po 5 dup 1
#po 5 win 7
#po 5 name Cluster
#### ip0 Link pi1dxc-15
po 6 baud 76800
po 6 dup 0
po 6 win 7
#po 6 quality 255
po 6 name pi1dxc-15
r f add 6 pi1dxc-15
r bc ad 6 pi1dxc-15
r bc ad 6 nodes
#### ip1 Link pi1snk
po 7 baud 76800
po 7 dup 0
po 7 win 7
#po 7 quality 255
po 7 name pi1snk
r bc ad 7 pi1snk
r bc ad 7 nodes
#### ip2 Link pi1dec-14
po 8 baud 76800
po 8 dup 0
po 8 win 7
#po 8 quality 255
po 8 name pi1dec-14
r bc ad 8 pi1dec-14
r bc ad 8 nodes
#### ip3 Link pi1bdg
po 9 baud 76800
po 9 dup 0
po 9 win 7
#po 9 quality 255
po 9 name pi1bdg
r bc ad 9 pi1bdg
r bc ad 9 nodes
#### ip4 Link pi1cdr
po 10 baud 38400
po 10 dup 0
po 10 win 7
po 10 quality 255
po 10 name pi1cdr
r bc ad 10 pi1cdr
r bc ad 10 nodes

Start (X)Net/kissattach/slip at boot

I have written the startup script below so that all services are started. Now of course it is nice if this also happens when booting the server. First the start script.

#!/bin/sh
#
tmpfile="/tmp/$$.startax0.pts"
#
kissnetd -p 2 > "$tmpfile" &
#
sleep 2
#
attachthem () {
        read PTS1 PTS2
        echo "Starting PTS gekloot voor poort AX0 :)"
        kissattach -l $PTS1 ax0 192.168.1.113
	ifconfig ax0 netmask 255.255.255.0
        sleep 1
        sed -i "s,attach sdev3 kiss 3 1 115200 /dev/.*$,attach sdev3 kiss 3 1 115200 $PTS2," /usr/local/xnet/AUTOBOOT.NET
}

tail -n 1 $tmpfile | attachthem
rm $tmpfile
#
tmpfile="/tmp/$$.startax1.pts"
#
kissnetd -p 2 > "$tmpfile" &
#
sleep 2

attachthem () {
	read PTS1 PTS2
	echo "Starting PTS gekloot voor poort AX1 :)"
        kissattach -l $PTS1 ax1 192.168.1.113
        ifconfig ax1 netmask 255.255.255.0
        sleep 1
        sed -i "s,attach sdev4 kiss 4 1 115200 /dev/.*$,attach sdev4 kiss 4 1 115200 $PTS2," /usr/local/xnet/AUTOBOOT.NET
}

tail -n 1 $tmpfile | attachthem
rm $tmpfile
################## Klote slip link ###################################
XNET_DIR=/usr/local/xnet
LINIP=192.168.1.200     # LINUX-IP   address
XNET=192.168.1.201  # XNET  address
#
cd /usr/local/xnet
./dev &
#
sleep 2
#
attachthem () {
        read PTS1 PTS2
        echo "Starting PTS gekloot voor de slip link :)"
        slattach -s 38400 -p slip $PTS1 &
        sleep 1
        ifconfig sl0 $LINIP netmask 255.255.255.255 pointopoint $XNET mtu 236 up
        sleep 1
        sed -i "s,attach sdev6 slip 38400 /dev/.*$,attach sdev6 slip 38400 $PTS2," /usr/local/xnet/AUTOBOOT.NET
}

tail -n 1 /tmp/slip | attachthem
rm /tmp/slip

cd /usr/local/sbin
./ppconversd &
sleep 3
#
cd /usr/local/xnet
./rstatrxd /var/www/cgi-bin/postat/ &
sleep 2
#
  /sbin/modprobe netrom
  /usr/local/sbin/nrattach -i 192.168.1.113 -m 512 netrom
  /usr/local/sbin/nrattach -i 192.168.1.113 -m 512 netcon
  /usr/local/sbin/nrattach -i 192.168.1.113 -m 512 netbbs
# Init Netrom
   /usr/local/sbin/netromd -i -l -t 30
# Enable External Logons
  /usr/local/sbin/ax25d &
  /bin/sleep 2
# Start Mheard daemon
 /usr/local/sbin/mheardd
# start fbb
 /usr/local/sbin/fbb &
# Nu dan eindelijk Xnet
./linuxnet < /dev/tty2 > /dev/tty2 2>&1 &

Now I have created the following file in /etc/init.d with the name xnet.

#!/bin/sh
### BEGIN INIT INFO
# Provides:          xnet
# 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: Run /usr/local/xnet/xnet if it exist
### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin

. /lib/init/vars.sh
. /lib/lsb/init-functions

do_start() {
        if [ -x /usr/local/xnet/xnet ]; then
                [ "$VERBOSE" != no ] && log_begin_msg "Running pi1lap)"
                /usr/local/xnet/xnet
                ES=$?
                [ "$VERBOSE" != no ] && log_end_msg $ES
                return $ES
        fi
}

case "$1" in
    start)
        do_start
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac

Now it has to be added.
update-rc.d xnet defaults
update-rc.d xnet enable

Well, reboot and see if everything is alright.