--===============1973623973==
Content-Type: multipart/alternative;
boundary="=====================_429598359==.ALT"

--=====================_429598359==.ALT
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable

At 09:54 AM 9/8/2006,=20
=3D?koi8-r?Q?=3DF0=3DCF=3DCB=3DCF=3DD4=3DC9=3DCC=3DC5=3DCE= 3DCB=3DCF_?=3D=
=3D?koi8-r?Q?=3DEB=3D wrote:
>Is this possible?
>
>I've defined 2 virtual hosts on the same ip address but on different
>port + one standard on port 21.
>
>When trying to connect to one of virtual hosts (not port 21) I always
>geting into the standard repository.
>
>Config attached.
>
>--
>=F0=CF=CB=CF=D4=C9=CC=C5=CE=CB=CF =EB=CF=D3=D4=C9=CB


I tried to duplicate your config in my=20
environment, and it all works under ProFTPD=20
1.3.0. There's only one 'bug' in your config=20
that I can see. FTP needs to use _two_ port=20
addresses, the port you name and one less than=20
that, for data connections. So when you said=20
"Port 3422" you would also be using port 3421 for=20
that same VirtualHost, overlapping the other=20
VirtualHost. But even when I used the same (bad)=20
port numbers, I could still get connected.

Here's some pieces of the config I tested with:
ServerType standalone
DefaultServer off

ServerName "Base FTP server"
ServerIdent on "Base FTP server ready."
Port 21


Port 3420
ServerName "First Virtual FTP server"
ServerIdent on "First Virtual FTP server ready."



Port 3422
ServerName "Second Virtual FTP server"
ServerIdent on "Second Virtual FTP server ready."


Note that I use the ServerName and ServerIdent=20
values to help me see _which_ site config I've really connected to.

When I start this up I see the three sets of ports being used:
(under Solaris the command is "netstat -a -P tcp -f inet", under
Linux I use "netstat -t -l -p" to see which ports are being listened=
to)
*.ftp *.* 0 0 49152 0 LISTEN
*.3420 *.* 0 0 49152 0 LISTEN
*.3422 *.* 0 0 49152 0 LISTEN

When I test from command-line I see these results:
ftp ftptest
220 Base FTP server ready.

ftp ftptest 3420
220 First Virtual FTP server ready.

ftp ftptest 3422
220 Second Virtual FTP server ready.
so it all works just fine.

I changed the config to use your (bad) ports, like so:

Port 3422


Port 3421

And restarted and retested and saw:
*.ftp *.* 0 0 49152 0 LISTEN
*.3422 *.* 0 0 49152 0 LISTEN
*.3421 *.* 0 0 49152 0 LISTEN

ftp ftptest
220 Base FTP server ready.

ftp ftptest 3421
220 Second Virtual FTP server ready.

ftp ftptest 3422
220 First Virtual FTP server ready.

so it all still worked for connecting. (If you=20
tried data transfers or directory listings the=20
overlapping ports will cause trouble)

So, fix the ports, and try putting in the=20
ServerName and ServerIdent values, and see if=20
that helps you figure out what is _really_=20
happening. Maybe you weren't specifying the port=20
numbers correctly when testing?=20
--=====================_429598359==.ALT
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



At 09:54 AM 9/8/2006,
=3D?koi8-r?Q?=3DF0=3DCF=3DCB=3DCF=3DD4=3DC9=3DCC=3DC5=3DCE= 3DCB=3DCF_?=3D =
=3D?koi8-r?Q?=3DEB=3D
wrote:

Is this possible?


I've defined 2 virtual hosts on the same ip address but on different

port + one standard on port 21.


When trying to connect to one of virtual hosts (not port 21) I
always

geting into the standard repository.


Config attached.


--

=F0=CF=CB=CF=D4=C9=CC=C5=CE=CB=CF =EB=CF=D3=D4=C9=CB=
<casper@meteor.dp.ua>


I tried to duplicate your config in my environment, and it all works
under ProFTPD 1.3.0.   There's only one 'bug' in your config
that I can see.  FTP needs to use _two_ port addresses, the port you
name and one less than that, for data connections.  So when you said
"Port 3422" you would also be using port 3421 for that same
VirtualHost, overlapping the other VirtualHost.  But even when I
used the same (bad) port numbers, I could still get connected.


Here's some pieces of the config I tested with:

  ServerType      standalone

  DefaultServer   off


  ServerName      "Base FTP
server"

  ServerIdent     on  "Base FTP server
ready."

  Port 21


  <VirtualHost 192.168.233.25>

    Port 3420

    ServerName       
"First Virtual FTP server"

    ServerIdent      
on  "First Virtual FTP server ready."

  </VirtualHost>


  <VirtualHost 192.168.233.25>

    Port 3422

    ServerName       
"Second Virtual FTP server"

    ServerIdent      
on  "Second Virtual FTP server ready."

  </VirtualHost>


Note that I use the ServerName and ServerIdent values to help me see
_which_ site config I've really connected to.


When I start this up I see the three sets of ports being used:

    (under Solaris the command is "netstat -a -P tcp
-f inet", under

     Linux I use "netstat -t -l -p" to see
which ports are being listened to)

     
*.ftp      *.*     
0      0 49152      0
LISTEN

      *.3420    
*.*      0      0
49152      0 LISTEN

      *.3422    
*.*      0      0
49152      0 LISTEN


When I test from command-line I see these results:

      ftp ftptest

      220 Base FTP server ready.


      ftp ftptest 3420

      220 First Virtual FTP server
ready.


      ftp ftptest 3422

      220 Second Virtual FTP server ready.

so it all works just fine.


I changed the config to use your (bad) ports, like so:

  <VirtualHost 192.168.233.25>

    Port 3422

 

  <VirtualHost 192.168.233.25>

    Port 3421


And restarted and retested and saw:

     
*.ftp      *.*     
0      0 49152      0
LISTEN

      *.3422    
*.*      0      0
49152      0 LISTEN

      *.3421    
*.*      0      0
49152      0 LISTEN


      ftp ftptest

      220 Base FTP server ready.


      ftp ftptest 3421

      220 Second Virtual FTP server
ready.


      ftp ftptest 3422

      220 First Virtual FTP server
ready.


so it all still worked for connecting.  (If you tried data transfers
or directory listings the overlapping ports will cause trouble)


So, fix the ports, and try putting in the ServerName and ServerIdent
values, and see if that helps you figure out what is _really_
happening.  Maybe you weren't specifying the port numbers correctly
when testing?



--=====================_429598359==.ALT--


--===============1973623973==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642
--===============1973623973==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ProFTPD Users List
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
--===============1973623973==--