ftpwire
FTPWIRE is a very simple FTP daemon.
Use 'ipftp' when you need to send data using FTP - or Grab data from a remote
FTPd site.
Use 'ftpwire' when a remote host needs to send to the Fip.
The file is slotted into the spool/2brouted queue for IPROUTE to process and
route.
To send to ftpwire, use the normal 'ftp' program :
ftp -P 9130 (hostname of the Fip)
or ftp hostname 9130
FTP uses 2 ports - one for control and the other for data. In normal FTPese,
hese are 21 and 20. 'ftpwire' use the -P input switch to define the Control
port. If it is started with port 21, then it will use port 20 as a fixed port
to send data from/to.
If the parameter 'fixed-data-port' is set, that number is used.
Otherwise the dataport is just the first available port.
Remember ports 20 and 21 are reserved ports on Unix/Linux and 'root' must start
any program using a port < 1024 (and you must make sure ftpd in inet.d or
xinet.d is disabled or on a different port)
If using WIN2K, you MUST specify a unique wireid using the -I input switch and
specify several instances of ftpwire in the SYSTEM file for the number of
instances you want.
If using Unix/Linux, only one instance of ftpwire should be in the SYSTEM file
and the -E 99 switch is used to determine the number of simultaneous inputs.
-- Optional parameter file is under tables/wire and the '-n' input switch and
defaults to FTPWIRE. A '.FIP' extension may be added.
Syntax :
; comment line
banner: Replacement banner
logon-file:(filename) See below - default LOGON.(-n) or LOGON.FTPWIRE.FIP
allow-blank-pwd: (yes/no) If there is a blank password in the logon file,
accept ANY password. default-no
nat-pasv-address:(Ip address) if using a proxy and/or NAT addresses, this is
the address of THIS host to the outside world. It is used in the PORT command
extra-fiphdr: (fipseq) Additional progs.FipHdr info to be added to each incoming
file. default none
extra-fiphdr-ext: (fipseq) Additional progs.FipHdr info to be added to each incoming
file. default none
no-archive: do NOT archive the data in the daily archive files in log/data
(ZI: fiphdr field)
min-data-port: (number)
max-data-port: (number)
minimum (default is 32000) and maximum (def 64000) range of part number for
the DATA port
fixed-data-port: (number) A single, fixed data port number.
Default is port 20 if the Control port is set to 21 (-P 21),
otherwise it is a high port within the range specifiied by the min and max
(see above)
connection-retries: (number) default 5
send-timeout: (number) default 60 secs
recv-timeout: (number) default 60 secs
connection-timeout: (number) default 20 secs
session-timeout: (number) default 1200 secs (20 mins) of no activity
between-files-timeout: (number) default 1200 secs (20 mins) of no activity
round-robin: (number) default: none
round-robin-fiphdr: (2 letter progs.FipHdr field) default: none
Round-Robin the output files and add the RR number to the fipHdr.
Both parameters are required - the Number is the MAXimum.
eg round-robin:9
round-robin-fiphdr:RR
and a suitable output folder might be /fip/spool/xchg\RR
(This can be in the LOGON file or the default input switch -O xchg\\R
(remember double backers)
Note that the round-robin number is NOT added automatically - ie you MUST
specify a progs.FipHdr
allow: (IPaddress to allow)
disallow: (IPaddress to block)
use this for blacklist/whitelist certain addresses
A '*' (star) can be used to indicate ALL eg 10.3.3.*
disconnect-limit: (number)
number of logon/password errors before connection is broken
default: ignored
disable-limit: (number)
number of logon/password errors before logon is blacklisted
default: ignored
allow-site-fiphdr: (yes/no) see SITE FIPHDR below default: no
allow-anon: (yes/no) Allow anonymous logons default-no
anon-desc: For Anon logons, fill in the default logon fields....
anon-topq:
anon-outq:
anon-fiphdr:
anon-standalone:
anon-display: Override the default display setting (same as -D)
timing-stats: (yes/no) generate Timing stats
-- Logons and Passwords
The types of logon/password are
- anonymous logon
use input switch -A to allow (disallowd by default)
use parameters to optionally add more information
anon-desc - just a note for logging
anon-fiphdr - extra fiphdr to add to each file
anon-topq - top folder for LIST and GETs
default is LISTs and GETS are not allowed
anon-copyq - folder holding a copy of any incoming file
anon-curq - under
- full logon and password (normal running)
- logon and allow any password - just leave the password blank and add -B
The Logon file is in tables/wir and is called LOGON.(name) where name is the
'-n' switch or FTPWIRE.FIP by default
fields in the Password file are pipe delimited and are :
field 0 Enabled or Diaabled flag E/D
1 progs.LogonName
2 Password
3 last mod time (used by the user interface only)
4 Description/Comment
5 optional home folder which is revealed as '/' to the remote
if this is blank, then LS and GETs are returned as no such folder/file
6 Output folder for any incoming files. If it does NOT start with a '/', the
folder is under /fip/spool
This can be in progs.FipSeq
If blank, the default output folder is used.
7 option copy folder where an exact copy of the incoming file
this can be the same as 5-home folder if the remote needs to see the file
8 any optional progs.ExtraFipHdr info
9 Option single letter Flags
S-standalone output file (original filename and no fiphdr)
C-standalone copy file (original filename and no fiphdr)
D-display all commands for this client only (ie -D for this one client)
Negate by adding a dash/hyphen prefix
ie to make sure there is a FipHdr/filename on the putput file '-S'
F-allow extra progs.FipHdr data to be added BEFORE the Store as a site command
SITE FIPHDR #SU:ZIBBLE#CX:ZIBBLE2EDITO
eg
E|Pittlewire|zong|0|Mr Pittles Image
Agency||2edsys||#DF:PITTLEWIRE.FIP#EQ:pittle|
E|Brittle||0|Mr Brittle progs.HardHat
Agency||xchg|#CX:B2FIP#DF:BRITTLE.FIP#EQ:brittle|
-- progs.FipHdr fields added to each file UNLESS the Standalone option has been
flagged
SP IPaddress of the remote host
SN Filename given
SU -n input switch or FTPWIRE
SA logon name
SC chrset - defaults to ASCII
S1 client description for the logon file
S2 wire id
S3 session id
S4 current PWD
S5 any extra subfolder in a put command
S6 current Client system details (if offered by remote)
Input Parameters :
Optional :
-9 : do not use Speedy on a Speedy system
-A : allow anonymous logons default: always need a logon/pwd
-B : allow blank passwords default: always need a pwd
if the password field is blank in the LOGON file, no checking takes place.
-d : done folder default: none
This holds a copy of all incoming data files from every source
The structure is
(done folder) / (date)_(logon) eg 20110921_fip / (filename as written to the
output folder)
It can be purged with an entry in maintenance (zapfiplog)
eg if '-d raw.ftpwire' and we want the last 30 days data
/fip/bin/ipdelque -q/fip/spool/raw.ftpwire -i1 -a30
-D : display all commands for each connection default: no
Use this to trace problem connections
-E : maximum number of threads default: 1
up to a max of 200 (not Win2k)
Note this is also a hardware limit in that small systems may not be able to
run more than 50 or so
-F : allow SITE FIPHDR commands default: no
-I : wire id default: 0
used to track which instance of a multi-ftpwire system a file arrived/logged
-l : log level
-n : name of this wire default: FTPWIRE
-O : Name of the output folder if not default default: spool/2brouted
This folder will be under /fip/spool
-P : Port for control default: 9130
-P 21 is normal
-s : local hostname or ipaddress default: all local addresses
where a server has multiple ip address/hostnames, use '-s' to restrict
connections to a single address
-S : default is standlone and not Fip default: next folder is fip
in this case do NOT add a Fiphdr and preserve exactly the incoming filename
this can be overridden in the Logon file
-T : log timing stats default: no
-v : Print the version number and exit
the -D input switch will display all cmds etc as they come in
eg
Thu Jun 11 12:27:44 id.35 ++ New Connection FTPWIRE 195.185.192.221
w.0.id.35.tot.1
Thu Jun 11 12:27:44 id.35 Send.23 220 Fip FTP service~~|
Thu Jun 11 12:27:44 id.35 Recv.10 USER zibbly|
Thu Jun 11 12:27:44 id.35 Send.20 331 Enter password~~|
Thu Jun 11 12:27:44 id.35 Recv.12 PASS *******|
Thu Jun 11 12:27:45 id.35 Send.14 230 Logon ok~~|
Thu Jun 11 12:27:45 id.35 Recv.3 PWD|
Thu Jun 11 12:27:45 id.35 Send.7 257 /~~|
Thu Jun 11 12:27:45 id.35 Recv.4 PASV|
Thu Jun 11 12:27:45 id.35 Send.45 227 Entering Passive Mode
(10,1,1,35,125,1)~~|
Thu Jun 11 12:27:45 id.35 Recv.6 TYPE I|
Thu Jun 11 12:27:45 id.35 Send.8 200 ok~~|
Thu Jun 11 12:27:45 id.35 Recv.34 STOR 0223-42-2009-IT0001347175.zip|
Thu Jun 11 12:27:45 id.35 Send.10 150 go..~~|
Thu Jun 11 12:27:45 id.35 Recv 1460 on Data Port
Thu Jun 11 12:27:45 id.35 Recv 1460 on Data Port
Thu Jun 11 12:27:45 id.35 Recv 1460 on Data Port
Thu Jun 11 12:27:45 id.35 Recv 1460 on Data Port
Thu Jun 11 12:27:45 id.35 Recv 1460 on Data Port
Thu Jun 11 12:27:45 id.35 Recv 1460 on Data Port
Thu Jun 11 12:27:45 id.35 Recv 1460 on Data Port
Thu Jun 11 12:27:45 id.35 Recv 538 on Data Port
Thu Jun 11 12:27:45 id.35 .. Incoming File logon.zibbly
file.0223-42-2009-IT0001347175.zip -> /home/hohoho [ferdy.#XX:extrastuff]
Thu Jun 11 12:27:45 id.35 Send.17 226 end of file~~|
Thu Jun 11 12:27:45 id.35 Recv.4 QUIT|
Thu Jun 11 12:27:45 id.35 Send.10 221 bibi~~|
Version Control
;000j12 5jun09 original version
;h3 spoof TYPE ;8 CWD -> 250;9 added F and H ;10-11 added -Z ;12-14 RR added
;h15-18 mixup with multicard servers and RR; 18 display as option ;1920
;j4 12sep09 speedier version ;2 15oct09 added disable/disconnect-limits ;3
minor cleanup for GET
;4 allow * in black/whitelist
;5 tuning ;6-8 added SIZE and FEAT ;9 track disableds better ;10 2dec10 added
SITE FIPHDR
;12 20may11 added progs.FipHdr inbound if nec
(copyright) 2011 and previous years progs.FingerPost Ltd.
Notes and Comments
Topic revision: r1 - 21 Jan 2005 - 13:41:32 -
TWikiGuest