Forum Discussion
Josh_Hildebran1
Nimbostratus
Aug 15, 2008FTP welcome message for redirecting
I'd like to create an iRule that I can put on a VIP that doesn't have any pool associated with it. The VIP will be listening on port 21 for FTP.
I'd like an iRule that accepts the FTP client's commands and passes back some text for the welcome or connection message that says, in short, "This FTP site is down, call some number to find out why". Then it can close the FTP connection nicely, if possible.
Is this easy, or difficult? I don't want to rewrite an FTP server, if you know what I mean.
- James_Quinby_46Historic F5 Account'Easy' or 'difficult' are going to be relative terms, of course - have a look at this irule that implements "Hunt the Wumpus" via FTP. If all you want to do is send across custom banner text, you can probably pare this down quite a bit and reuse chunks of it.
- Josh_Hildebran1
Nimbostratus
Very cool.. Thank you! - James_Quinby_46Historic F5 AccountJust for fun, I whipped this together. It's pretty much the bare essentials:
when CLIENT_ACCEPTED { TCP::respond "220 XYZ Inc. FTP Server\r\n" TCP::respond "211 This FTP server is currently out of service. Please try again later.\r\n" TCP::close }
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\>ftp 10.2.2.54 Connected to 10.2.2.54. 220 XYZ Inc. FTP Server This FTP server is currently out of service. Please try again later. Connection closed by remote host. C:\Documents and Settings\>
ftp 10.2.2.54 Connected to 10.2.2.54 (10.2.2.54). 220 XYZ Inc. FTP Server Name (10.2.2.54:root): asdf This FTP server is currently out of service. Please try again later. Login failed. No control connection for command: Broken pipe ftp>
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects