Re: per_source on redhat 7.2

George Law <[email protected]> Wed, 2 Jul 2003 15:02:47 -0400
Newsgroups gmane.network.xinetd
Message-ID <[email protected]>
Sorry - sent this one right to steve grubb by mistake.


Steve G writes:
 

 > There has also been several bug fixes put into cvs that
 > corrects xinetd reloading. If you send xinetd SIGHUP to
 > re-read its configuration, it doesn't always work
 > correctly. Curent cvs works much much better. (I was hoping
 > 2.3.12 would be released by now so those problems go away.)
 > The work around is to completely stop xinetd and then start
 > it. I don't know if that is causing your problems.
 > 

I used /etc/init.d/xientd to restart - this does a full stop then
start, so I don't think this applies.


 > Try testing on a smaller scale in a controlled environment
 > and I think you should see that it works fine. BTW, what
 > happens when you start 6 sessions to the same IP-address on
 > your ftp server? Do you get rejected on the 6th connection?
 > Does 5 of them succeed?
 > 


"to the same IP-address" is the magic phrase.

We are a web hosting company.  Our servers are multi-homed - each has
a  couple hundred IP addresses and we use wu-ftp's virtual ftp option
to provide clients their own anonymous FTP bound to their IP address.

I wrote a little perl script which makes 200 calls to Net::FTP
to open a ftp connection (to the same ip).  Connections 6-200 are
refused as expected.

I just grabbed the current CVS and see in the CHANGELOG:
  Make ident protocol work properly for multi-homed hosts. -Alan Sundell

After reading the change log the bells and whistles started going off.
I updated the script (new version below) to connect to 200 DIFFERENT
IP addresses.  This time,  it hits connection 60 before it starts to fail.

I compiled the CVS version, stopped xinetd, installed the new xinetd
executable and started it up /etc/init.d/xinetd start but  still get
the same problem.

Is this a bug or a feature? :)

--
Cordially,

                                          George Law
____________________________________________________________________
Systems Engineer                      Software Workshop Inc.
[email protected] 315.635-1968 (x-213)     "software that fits!" (TM)



#!/usr/bin/perl
use Net::FTP;


if (@ARGV == 1) {
      $baseIP= $ARGV[0];
} else {
  print qq(Usage: scanFTP baseIP (xx.xx.xx.)\n);
  exit (1);
}


for ($i = 1; $i < 200; $i++) {
    $thisIP = $baseIP . $i;
    print qq(connecting to host  $thisIP ... );
   if ($ftp[$i] = Net::FTP->new("$thisIP", Debug => 9)) {
       print qq(OK\n);
       $ftp[$i]->login("anonymous",'-anonymous@');
       $ftp[$i]->ls("/download");
    }          else {
       print qq(Failed! \n);
    }

}