Subject: Virtual Class Patch

From: "Rick S. Harby" <[email-masked]>
Date: Thu, 18 Jul 1996 14:37:32 -0400 (EDT)

If anyone is interested, I just finished hacking 2.4 Beta 11 and
modified the class structure in ftpaccess to conform to the following:

class <class name> <local addr> <typelist> <addrglob> [<addrglob> ...]

  I use this patch, so I can track how many people are on each
of my virtual ftp hosts. And it allows you to assign limits
which can be imposed on virtual hosts. For example... we do
virtual hosting for a company fortevr.com, and on the same machine
is our primary ftp. So I do this:

class fortevr 198.70.51.99 anonymous,guest 	*
class local   198.70.51.31 real			*
class remote  198.70.51.31 anonymous,guest	*

limit fortevr	50	Any	/etc/msgs.forte.toomany
limit remote	200	Any	/etc/msgs.forte.toomany

  This has an interesting side effect, in that none of my users
can real login to the 198.70.51.99 address as well. If anyone is
interested in this patch, let me know and I'll clean it up
and post it.

				-Rick S. Harby

---

From: "James B. Byrne" <[email-masked]>
Date: Thu, 18 Jul 1996 17:51:24 -0400

I just obtained and built wu-ftp 2.4.2b11 on an hp-ux 10.01 series 800
server.  We have it working as far as I can tell.  I have one question
though:  Is it possible to configure or modify wu-ftpd so that you can
have virtual anonymous users?  

By that I mean if we are virtually hosting company1.com, charity2.org,
and company3.com in addition to our 'real' name of host.net is it
possible to set things up so that:
 
ftp charity2.org allows a login of anonymous to go to
/virtual/home/charity1/ftp; while

ftp to company2.com and a login of anonymous goes to
/virtual/home/company2/ftp; and 

ftp to host.net with a login of anonymous will put them in
/var/home/ftp. 

I gather not from the current docs but has anybody got any ideas on how
to make this work?

Regards,
-- 
James B. Byrne			mailto:[email-masked]
Harte & Lyne Limited		http://www.harte-lyne.ca
Hamilton, Ontario		905-561-1241

---

From: "Rick S. Harby" <[email-masked]>
Date: Thu, 18 Jul 1996 18:36:10 -0400 (EDT)

Not sure if it will do that on your system, but it does have support
for doing that. And it does work very nicely under Linux.

				-Rick S. Harby

---

From: "Rick S. Harby" <[email-masked]>
Date: Thu, 18 Jul 1996 18:37:37 -0400 (EDT)

Anyone interested in this patch, I have made it available on my
anonymous ftp site... check it out and tell me what you think.

   ftp.eznet.net:/pub/wu-ftpd/patches

  Not much there yet, but I'm working on a few other cool virtual
patches which those of you doing virtual hosting might find attractive.

				-Rick S. Harby
				 [email-masked]

---

From: Michael Brennen <[email-masked]>
Date: Thu, 18 Jul 1996 17:48:42 -0500 (CDT)

> have virtual anonymous users?  

Yup.  Read the doc VIRTUAL.FTP.SUPPPORT (yes, it is spelled that way) in
the beta 11 distribution.  You can do anonymous, guest and real ftp to a
virtual site.  I have three running that way. 

   -- Michael

---

From: "James B. Byrne" <[email-masked]>
Date: Thu, 18 Jul 1996 21:32:47 -0400

I guess that I must be thick or something.  I have built the server 
with the -DVIRTUAL CFLAG and I can't see any difference in the 
behavior of the program.  When I attempt to login via anonymous I end 
up in the ftp root of the real host name, not in the virtual server 
root.  Is there something else that need to be configured?  A copy of 
my ftpaccess file is included:

class   all     real,guest,anonymous  *
class   remote  guest,anonymous *
class   local   real,guest *
class   anon    anonymous *
class   user    real *

#deny !nameserved /etc/ftpd/msgdeny.txt warn
path-filter remote /etc/pathmsg ^[-A-Za-z0-9._]*$ ^. ^-
noretrieve ftpaccess ftpgroups ftphosts ftpusers group passwd
passwd-check rfc822 warn

limit   anon            50      Any     /etc/ftpd/msglimit.txt

readme  README*                 login
readme  README*                 cwd=*

message /msglogon.ftp           login
message .message                cwd=*

delete          no      anonymous,guest         # delete permission?
overwrite       no      anonymous,guest         # overwrite 
permission?
rename          no      anonymous,guest         # rename permission?
chmod           no      anonymous,guest         # chmod permission?
umask           no      anonymous,guest         # umask permission?

compress        no              local remote
tar             no              local remote

log commands            real
log transfers           anonymous,real          inbound,outbound

shutdown /etc/shutmsg

email [email-masked]]

virtual [205.206.207.71] root /usr/www/grognard/
virtual [205.206.207.71] banner /usr/www/grognard/banner.txt
virtual [205.206.207.71] logfile /var/adm/syslog/ftp71.log

guestgroup grognard

# 

The /usr/www/grognard/etc/passwd file contains:

root:*:0:0::/:/bin/dud
byrnejb:*:201:218::/usr/www/grognard/./:bin/dud
grognard:*:241:218::/usr/www/grognard/./:/bin/dud
veteran::246:218::/usr/www/grognard/./ftp/:/bin/dud
# 
Do I need an anonymous user in here?
-- 
James B. Byrne                 mailto:[email-masked]
Harte & Lyne Limited           http://www.harte-lyne.ca
Hamilton, Ontario              905-561-1241

---

From: "Rick S. Harby" <[email-masked]>
Date: Thu, 18 Jul 1996 23:05:39 -0400 (EDT)

Looks to me like you just need to get rid of the []'s around the
ip's in the virtual entries. Try that and see what happens. 

 I assume that you have already configured the machine for multiple
IP's on the same interface, since you are connecting to those IP's and
getting the ftpd atleast...

			-Rick S. Harby

---

From: "James B. Byrne" <[email-masked]>
Date: Thu, 18 Jul 1996 23:27:17 -0400

Thanks for the help.

I removed the [ and the ] around the virtual IP.  Nothing changed in the
behavior of the anonymous ftp.  I am still connecting directly to the
real ftp root.

Is there anywhere else that I should be looking? /etc/passwd?

Regards,

---

From: Michael Brennen <[email-masked]>
Date: Fri, 19 Jul 1996 00:06:04 -0500 (CDT)

> root.  Is there something else that need to be configured?  A copy of 
<...>
> virtual [205.206.207.71] logfile /var/adm/syslog/ftp71.log

Something is not adding up here.  I just had a dig around in your DNS, and
I only see one IP address in A records in the whole thing.  In the DNS
below, grognard.org and home.grognard.org are the same IP address on the
same host.  You need different IP addresses assigned to run virtual
servers on the same host.  Did I miss something?

   -- Michael

; <<>> DiG 2.1 <<>> @DNS.HARTE-LYNE.CA grognard.org axfr
; (1 server found)
grognard.org.   86400   SOA     home.grognard.org. support.harte-lyne.ca.
(
                        96051001        ; serial
                        10800   ; refresh (3 hours)
                        3600    ; retry (1 hour)
                        604800  ; expire (7 days)
                        86400 ) ; minimum (1 day)
grognard.org.   86400   NS      dns.harte-lyne.ca.
grognard.org.   86400   NS      nic.fonorola.net.
nic.fonorola.net.       165531  A       198.53.64.7
grognard.org.   86400   MX      10 mail.harte-lyne.ca.
grognard.org.   86400   MX      20 mail.toronto.iSTAR.net.
grognard.org.   86400   MX      30 mail.vancouver.iSTAR.net.
grognard.org.   86400   A       205.206.207.71
mail.grognard.org.      86400   CNAME   home.grognard.org.
ftp.grognard.org.       86400   CNAME   home.grognard.org.
www.grognard.org.       86400   CNAME   home.grognard.org.
home.grognard.org.      86400   A       205.206.207.71
home.grognard.org.      86400   MX      10 mail.harte-lyne.ca.
home.grognard.org.      86400   MX      20 mail.toronto.iSTAR.net.
home.grognard.org.      86400   MX      30 mail.vancouver.iSTAR.net.
home.grognard.org.      86400   HINFO   HP9000/842      HPUX-10.01
home.grognard.org.      86400   WKS     205.206.207.71 udp ( )
home.grognard.org.      86400   WKS     205.206.207.71 tcp ( )
grognard.org.   86400   SOA     home.grognard.org. support.harte-lyne.ca.
(
                        96051001        ; serial
                        10800   ; refresh (3 hours)
                        3600    ; retry (1 hour)
                        604800  ; expire (7 days)
                        86400 ) ; minimum (1 day)
;; Received 19 records.
;; FROM: ns1.fni.com to SERVER: 205.206.207.101
;; WHEN: Thu Jul 18 23:54:41 1996

---

From: "James B. Byrne" <[email-masked]>
Date: Fri, 19 Jul 1996 11:27:27 -0400

As it turns out, grognard.org and grognard.com are aliases for the same
site.  They have to have the same IP.  Other virtual sites on our host
are 205.206.207.70, 205.206.207.69, etc.  These have their own DNS
entries and A class record.

Regards,