Logo address

/netlib/cmd/nodos

README

nodos is provided to protect some type of DoS attacks.
nodos protects connections that is over maxconnect(=10) from same IP.

usage: nodos [-m maxconnect] remote-ip local-port

nodos puts a log to /sys/log/nodos and
local-port is used only for taking the log.
The example is:
term% tail /n/ar/sys/log/nodos
ar May 14 09:02:54 1116028974 110 211.128.17.242
ar May 14 09:06:13 1116029173 110 211.128.17.242
ar May 14 09:44:42 1116031482 25 200.223.107.164
ar May 14 09:44:58 1116031498 25 200.223.107.164

the fifth field is time from unix epoch.

The usage example is:

term% cat /n/ar/rc/bin/service/tcp25
#!/bin/rc

ifs=! r=`{cat $3/remote} {i=$r(1)}
if(nodos $i 25)
	exec upas/smtpd  -g -n $3
echo '450 Busy, try later'
term%


coded by Kenar (Kenji Arisawa)


Contents

       761 README
       458 memo
       244 mkfile
      1974 nodos.c