Forum Discussion
Joe_Erchul_4263
Nimbostratus
Oct 28, 2009Rejecting a connection based on address and time of day?
Gang,
I've received a request from our Application folks to drop a connection between a client machine and a database server every day at midnight (or some other wee-morning-hour time). This connection traverses a load-balancer. I can think of a way to construct the iRule with the source and destination addresses, but what format would the "time of day" variable take?
Thanks in advance.
Joe
- hoolio
Cirrostratus
Hi Joe, - hoolio
Cirrostratus
Hi Joe, - L4L7_53191
Nimbostratus
Joe: I'd consider going back to good 'ol crontab for this particular job. It's perfectly suited for it, and you won't run into any challenges this way: the bigpipe command will absolutely work for you here from the shell. - naladar_65658
Altostratus
This may be of help regarding using time in an iRule: - naladar_65658
Altostratus
I haven't had a chance to try this out, but I think the general logic MAY look something like this: - hoolio
Cirrostratus
naladar, you can definitely check the current time from an iRule. But short of collecting the payload for every TCP connection to the VIP, I don't think you can kill an existing TCP connection from hour X through hour Y. You could potentially use discard or TCP::close to close new connections attempted during the time window, but I don't think that was the original poster's scenario. - Joe_Erchul_4263
Nimbostratus
Aaron,
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