| 1 |
# |
| 2 |
# Virtual Hosting Server Configuration |
| 3 |
# by M.Lowes <[email protected]> |
| 4 |
# for Frontier Internet Services Limited |
| 5 |
# (http://www.ftech.net/) |
| 6 |
ServerName "Master Webserver" |
| 7 |
|
| 8 |
# Spawn from inetd? |
| 9 |
#ServerType inetd |
| 10 |
|
| 11 |
# or maybe a standalone server... |
| 12 |
ServerType standalone |
| 13 |
|
| 14 |
# don't give the server banner until _after_ authentication |
| 15 |
DeferWelcome off |
| 16 |
|
| 17 |
# Some basic defaults |
| 18 |
Port 21 |
| 19 |
Umask 002 |
| 20 |
TimeoutLogin 120 |
| 21 |
TimeoutIdle 600 |
| 22 |
TimeoutNoTransfer 900 |
| 23 |
TimeoutStalled 3600 |
| 24 |
|
| 25 |
# No, I don't think we'll run as root! |
| 26 |
User ftp |
| 27 |
Group ftp |
| 28 |
|
| 29 |
# This is a non-customer usable name, (i.e. they should be connecting via |
| 30 |
# www.{domain}) not 'hostname'. Therefore let's dump them in a dummy account |
| 31 |
# and wait for them to scream. |
| 32 |
DefaultRoot /web/Legacy/ |
| 33 |
|
| 34 |
# Performance, let's do DNS resolution when we process the logs... |
| 35 |
UseReverseDNS off |
| 36 |
|
| 37 |
# Where do we put the pid files? |
| 38 |
ScoreboardFile /var/run/proftpd.score |
| 39 |
|
| 40 |
# Logging options |
| 41 |
TransferLog /var/spool/syslog/proftpd/xferlog.legacy |
| 42 |
|
| 43 |
# Some logging formats |
| 44 |
LogFormat default "%h %l %u %t \"%r\" %s %b" |
| 45 |
LogFormat auth "%v [%P] %h %t \"%r\" %s" |
| 46 |
LogFormat write "%h %l %u %t \"%r\" %s %b" |
| 47 |
|
| 48 |
# Global settings |
| 49 |
<Global> |
| 50 |
DisplayLogin welcome.msg |
| 51 |
DisplayChdir readme |
| 52 |
|
| 53 |
# having to delete before uploading is a pain ;) |
| 54 |
AllowOverwrite yes |
| 55 |
|
| 56 |
# Turn off Ident lookups |
| 57 |
<IfModule mod_ident.c> |
| 58 |
IdentLookups off |
| 59 |
</IfModule> |
| 60 |
|
| 61 |
# Logging file/dir access |
| 62 |
ExtendedLog /var/spool/syslog/proftpd/access.log WRITE,READ write |
| 63 |
|
| 64 |
# Record all logins |
| 65 |
ExtendedLog /var/spool/syslog/proftpd/auth.log AUTH auth |
| 66 |
|
| 67 |
# Paranoia logging level.... |
| 68 |
#ExtendedLog /var/spool/syslog/proftpd/paranoid.log ALL default |
| 69 |
</Global> |
| 70 |
|
| 71 |
# Deny writing to the base server... |
| 72 |
<Limit WRITE> |
| 73 |
DenyAll |
| 74 |
</Limit> |
| 75 |
|
| 76 |
# -------------------------------------------- |
| 77 |
# Virtual Servers start here.... |
| 78 |
# -------------------------------------------- |
| 79 |
# |
| 80 |
# www.ftech.net. |
| 81 |
# This is the default server |
| 82 |
# Gets all the connections for www.{customer.domain}, & www.ftech.net |
| 83 |
|
| 84 |
<VirtualHost www.ftech.net> |
| 85 |
ServerAdmin [email protected] |
| 86 |
ServerName "Master Webserver" |
| 87 |
MaxLoginAttempts 2 |
| 88 |
RequireValidShell no |
| 89 |
TransferLog /var/spool/syslog/proftpd/xferlog.www |
| 90 |
MaxClients 50 |
| 91 |
DefaultServer on |
| 92 |
DefaultRoot ~ !staff |
| 93 |
AllowOverwrite yes |
| 94 |
|
| 95 |
# Not quickly do we kick someone out |
| 96 |
TimeoutLogin 120 |
| 97 |
TimeoutIdle 600 |
| 98 |
TimeoutNoTransfer 900 |
| 99 |
|
| 100 |
# -------------------------------------------- |
| 101 |
# Got a Frontpage customer who keeps breaking things???? |
| 102 |
# - stick 'em in group fpage |
| 103 |
# -------------------------------------------- |
| 104 |
<Directory ~/public_html> |
| 105 |
# Block them from doing anything other than reading... |
| 106 |
<Limit STOR RNFR DELE> |
| 107 |
DenyGroup fpage |
| 108 |
</Limit> |
| 109 |
</Directory> |
| 110 |
|
| 111 |
# ditto for ftp_root if it's there... |
| 112 |
<Directory ~/ftp_root> |
| 113 |
<Limit STOR RNFR DELE> |
| 114 |
DenyAll |
| 115 |
</Limit> |
| 116 |
</Directory> |
| 117 |
|
| 118 |
# Limit by IP... |
| 119 |
<Directory /web/zsl> |
| 120 |
<Limit ALL> |
| 121 |
Order Allow,Deny |
| 122 |
Allow 195.200.31.220 |
| 123 |
Allow 212.32.17.0/26 |
| 124 |
DenyAll |
| 125 |
</Limit> |
| 126 |
</Directory> |
| 127 |
</VirtualHost> |
| 128 |
|
| 129 |
# -------------------------------------------- |
| 130 |
# Legacy server, left in because some people |
| 131 |
# haven't realised it's gone yet. Shove 'em into |
| 132 |
# a dummy $home |
| 133 |
|
| 134 |
<VirtualHost web-1.ftech.net> |
| 135 |
ServerAdmin [email protected] |
| 136 |
ServerName "Legacy Web Upload Server" |
| 137 |
MaxLoginAttempts 2 |
| 138 |
RequireValidShell no |
| 139 |
MaxClients 50 |
| 140 |
DefaultRoot ~ !staff |
| 141 |
MaxClients 2 |
| 142 |
AllowOverwrite yes |
| 143 |
TransferLog /var/spool/syslog/proftpd/xferlog.web-1 |
| 144 |
</VirtualHost> |
| 145 |
|
| 146 |
# -------------------------------------------- |
| 147 |
# ftp.ftech.net |
| 148 |
# -------------------------------------------- |
| 149 |
<VirtualHost ftp.ftech.net> |
| 150 |
ServerAdmin [email protected] |
| 151 |
ServerName "Frontier Internet Public FTP Server" |
| 152 |
TransferLog /ftp/xferlog/ftp.ftech.net |
| 153 |
MaxLoginAttempts 3 |
| 154 |
RequireValidShell no |
| 155 |
DefaultRoot /ftp/ftp.ftech.net |
| 156 |
AllowOverwrite yes |
| 157 |
|
| 158 |
# Auth files.... |
| 159 |
AuthUserFile /var/conf/ftp/authfiles/passwd.ftp.ftech.net |
| 160 |
AuthGroupFile /var/conf/ftp/authfiles/group.ftp.ftech.net |
| 161 |
|
| 162 |
# A basic anonymous configuration, no upload directories. |
| 163 |
<Anonymous /ftp/ftp.ftech.net> |
| 164 |
User ftp |
| 165 |
Group ftp |
| 166 |
|
| 167 |
# We want clients to be able to login with "anonymous" as well as "ftp" |
| 168 |
UserAlias anonymous ftp |
| 169 |
RequireValidShell no |
| 170 |
|
| 171 |
# Limit the maximum number of anonymous logins |
| 172 |
MaxClients 50 |
| 173 |
|
| 174 |
# We want 'welcome.msg' displayed at login, and '.message' displayed |
| 175 |
# in each newly chdired directory. |
| 176 |
|
| 177 |
<Directory pub/incoming> |
| 178 |
<Limit STOR> |
| 179 |
AllowAll |
| 180 |
</Limit> |
| 181 |
|
| 182 |
<Limit WRITE DIRS READ> |
| 183 |
DenyAll |
| 184 |
</Limit> |
| 185 |
|
| 186 |
<Limit CWD XCWD CDUP XCUP> |
| 187 |
AllowAll |
| 188 |
</Limit> |
| 189 |
</Directory> |
| 190 |
|
| 191 |
<Directory home> |
| 192 |
<Limit ALL> |
| 193 |
DenyAll |
| 194 |
</Limit> |
| 195 |
</Directory> |
| 196 |
|
| 197 |
# Limit access to the mirrors to LINX only |
| 198 |
<Directory mirrors> |
| 199 |
<Limit RETR> |
| 200 |
Order Allow,Deny |
| 201 |
Allow .uk, .ftech.net |
| 202 |
Allow .vom.tm |
| 203 |
DenyAll |
| 204 |
</Limit> |
| 205 |
</Directory> |
| 206 |
|
| 207 |
# Limit WRITE everywhere in the anonymous chroot |
| 208 |
<Limit WRITE> |
| 209 |
DenyAll |
| 210 |
</Limit> |
| 211 |
</Anonymous> |
| 212 |
</VirtualHost> |
| 213 |
|
| 214 |
# ---------------------------------------------------- |
| 215 |
# Virtual ftp with anon access, but no incoming |
| 216 |
# ---------------------------------------------------- |
| 217 |
<VirtualHost ftp.foo1.com> |
| 218 |
ServerAdmin [email protected] |
| 219 |
ServerName "Foo1 FTP Server" |
| 220 |
TransferLog /var/spool/syslog/xfer/ftp.foo1.com |
| 221 |
MaxLoginAttempts 3 |
| 222 |
RequireValidShell no |
| 223 |
DefaultRoot /ftp/ftp.foo1.com |
| 224 |
User foo1 |
| 225 |
Group foo1 |
| 226 |
AllowOverwrite yes |
| 227 |
|
| 228 |
# Auth files.... |
| 229 |
AuthUserFile /var/conf/ftp//authfiles/passwd.ftp.foo1.com |
| 230 |
AuthGroupFile /var/conf/ftp//authfiles/group.ftp.foo1.com |
| 231 |
|
| 232 |
<Anonymous /ftp/ftp.foo1.com> |
| 233 |
User ftp |
| 234 |
Group ftp |
| 235 |
UserAlias anonymous ftp |
| 236 |
RequireValidShell no |
| 237 |
MaxClients 20 |
| 238 |
|
| 239 |
<Limit WRITE> |
| 240 |
DenyAll |
| 241 |
</Limit> |
| 242 |
</Anonymous> |
| 243 |
</VirtualHost> |
| 244 |
|
| 245 |
# ---------------------------------------------------- |
| 246 |
# ftp.foo2.com |
| 247 |
# Anon, no incoming, some private access areas |
| 248 |
# ---------------------------------------------------- |
| 249 |
<VirtualHost ftp.foo2.com> |
| 250 |
ServerAdmin [email protected] |
| 251 |
ServerName "MC Research FTP Server" |
| 252 |
TransferLog /var/spool/syslog/xfer/ftp.foo2.com |
| 253 |
MaxLoginAttempts 3 |
| 254 |
RequireValidShell no |
| 255 |
DefaultRoot /ftp/ftp.foo2.com |
| 256 |
User foo2 |
| 257 |
Group foo2 |
| 258 |
AllowOverwrite yes |
| 259 |
|
| 260 |
# Auth files.... |
| 261 |
AuthUserFile /var/conf/ftp//authfiles/passwd.ftp.foo2.com |
| 262 |
AuthGroupFile /var/conf/ftp//authfiles/group.ftp.foo2.com |
| 263 |
|
| 264 |
<Directory /ftp/ftp.foo2.com/pub> |
| 265 |
<Limit WRITE> |
| 266 |
AllowUser mcres |
| 267 |
DenyAll |
| 268 |
</Limit> |
| 269 |
</Directory> |
| 270 |
|
| 271 |
<Directory /ftp/ftp.foo2.com/download> |
| 272 |
<Limit ALL> |
| 273 |
AllowUser mcres |
| 274 |
AllowUser customer |
| 275 |
DenyAll |
| 276 |
</Limit> |
| 277 |
</Directory> |
| 278 |
|
| 279 |
<Anonymous /ftp/ftp.foo2.com> |
| 280 |
User ftp |
| 281 |
Group ftp |
| 282 |
UserAlias anonymous ftp |
| 283 |
RequireValidShell no |
| 284 |
MaxClients 20 |
| 285 |
|
| 286 |
<Limit WRITE> |
| 287 |
DenyAll |
| 288 |
</Limit> |
| 289 |
|
| 290 |
<Directory download> |
| 291 |
<Limit ALL> |
| 292 |
DenyAll |
| 293 |
</Limit> |
| 294 |
</Directory> |
| 295 |
</Anonymous> |
| 296 |
</VirtualHost> |
| 297 |
|
| 298 |
# ---------------------------------------------------- |
| 299 |
# ftp.foo3.com |
| 300 |
# ---------------------------------------------------- |
| 301 |
<VirtualHost ftp.foo3.com> |
| 302 |
ServerAdmin [email protected] |
| 303 |
ServerName "Farrukh FTP Archive" |
| 304 |
TransferLog /var/spool/syslog/xfer/ftp.foo3.com |
| 305 |
MaxLoginAttempts 3 |
| 306 |
RequireValidShell no |
| 307 |
DefaultRoot /web/farrukh2/ftp_root |
| 308 |
User farrukh2 |
| 309 |
Group farrukh2 |
| 310 |
AllowOverwrite yes |
| 311 |
|
| 312 |
# Auth files.... |
| 313 |
AuthUserFile /var/conf/ftp//authfiles/passwd.ftp.foo3.com |
| 314 |
AuthGroupFile /var/conf/ftp//authfiles/group.ftp.foo3.com |
| 315 |
|
| 316 |
<Anonymous /web/farrukh2/ftp_root> |
| 317 |
User ftp |
| 318 |
Group ftp |
| 319 |
UserAlias anonymous ftp |
| 320 |
RequireValidShell no |
| 321 |
MaxClients 20 |
| 322 |
|
| 323 |
<Limit WRITE> |
| 324 |
DenyAll |
| 325 |
</Limit> |
| 326 |
|
| 327 |
<Directory pub/incoming/*> |
| 328 |
<Limit STOR> |
| 329 |
AllowAll |
| 330 |
</Limit> |
| 331 |
|
| 332 |
<Limit WRITE DIRS READ> |
| 333 |
DenyAll |
| 334 |
</Limit> |
| 335 |
|
| 336 |
<Limit CWD XCWD CDUP XCUP> |
| 337 |
AllowAll |
| 338 |
</Limit> |
| 339 |
</Directory> |
| 340 |
|
| 341 |
<Directory pub/Incoming/*> |
| 342 |
<Limit STOR> |
| 343 |
AllowAll |
| 344 |
</Limit> |
| 345 |
|
| 346 |
<Limit WRITE DIRS READ> |
| 347 |
DenyAll |
| 348 |
</Limit> |
| 349 |
|
| 350 |
<Limit CWD XCWD CDUP XCUP> |
| 351 |
AllowAll |
| 352 |
</Limit> |
| 353 |
</Directory> |
| 354 |
|
| 355 |
# block access to the secure areas by anon... |
| 356 |
<Directory fpub> |
| 357 |
<Limit ALL> |
| 358 |
DenyAll |
| 359 |
</Limit> |
| 360 |
</Directory> |
| 361 |
|
| 362 |
<Directory fgroup> |
| 363 |
<Limit ALL> |
| 364 |
DenyAll |
| 365 |
</Limit> |
| 366 |
</Directory> |
| 367 |
</Anonymous> |
| 368 |
|
| 369 |
# define user based access |
| 370 |
<Directory /web/farrukh2/ftp_root/fpub> |
| 371 |
<Limit ALL> |
| 372 |
AllowUser farrukh |
| 373 |
AllowUser fguest |
| 374 |
DenyAll |
| 375 |
</Limit> |
| 376 |
</Directory> |
| 377 |
|
| 378 |
<Directory /web/farrukh2/ftp_root/fgroup> |
| 379 |
<Limit ALL> |
| 380 |
AllowUser farrukh |
| 381 |
AllowUser fgroup |
| 382 |
DenyAll |
| 383 |
</Limit> |
| 384 |
</Directory> |
| 385 |
</VirtualHost> |
| 386 |
|
| 387 |
|
| 388 |
# ---------------------------------------------------- |
| 389 |
# ftp.foo4.com |
| 390 |
# anon, with incoming upload |
| 391 |
# ---------------------------------------------------- |
| 392 |
<VirtualHost ftp.foo4.com> |
| 393 |
ServerAdmin [email protected] |
| 394 |
ServerName "Teamwork FTP Server" |
| 395 |
TransferLog /var/spool/syslog/xfer/ftp.foo4.com |
| 396 |
MaxLoginAttempts 3 |
| 397 |
RequireValidShell no |
| 398 |
DefaultRoot /ftp/ftp.foo4.com |
| 399 |
User foo4 |
| 400 |
Group foo4 |
| 401 |
AllowOverwrite yes |
| 402 |
|
| 403 |
# Auth files.... |
| 404 |
AuthUserFile /var/conf/ftp//authfiles/passwd.ftp.foo4.com |
| 405 |
AuthGroupFile /var/conf/ftp//authfiles/group.ftp.foo4.com |
| 406 |
|
| 407 |
<Anonymous /ftp/ftp.foo4.com> |
| 408 |
User ftp |
| 409 |
Group ftp |
| 410 |
UserAlias anonymous ftp |
| 411 |
RequireValidShell no |
| 412 |
MaxClients 20 |
| 413 |
|
| 414 |
<Limit WRITE> |
| 415 |
DenyAll |
| 416 |
</Limit> |
| 417 |
|
| 418 |
<Directory pub/incoming/*> |
| 419 |
<Limit STOR> |
| 420 |
AllowAll |
| 421 |
</Limit> |
| 422 |
|
| 423 |
<Limit WRITE DIRS READ> |
| 424 |
DenyAll |
| 425 |
</Limit> |
| 426 |
|
| 427 |
<Limit CWD XCWD CDUP XCUP> |
| 428 |
AllowAll |
| 429 |
</Limit> |
| 430 |
</Directory> |
| 431 |
|
| 432 |
<Directory pub/Incoming/*> |
| 433 |
<Limit STOR> |
| 434 |
AllowAll |
| 435 |
</Limit> |
| 436 |
|
| 437 |
<Limit WRITE DIRS READ> |
| 438 |
DenyAll |
| 439 |
</Limit> |
| 440 |
|
| 441 |
<Limit CWD XCWD CDUP XCUP> |
| 442 |
AllowAll |
| 443 |
</Limit> |
| 444 |
</Directory> |
| 445 |
</Anonymous> |
| 446 |
</VirtualHost> |
| 447 |
|
| 448 |
# ---------------------------------------------------- |
| 449 |
# The end.... |
| 450 |
# ---------------------------------------------------- |
| 451 |
|