Forum Discussion
Salvador_del_Re
Feb 01, 2010Historic F5 Account
select server without a pool
I want redirect the trafic to a specific server but the server not´s belong to any pool.
I create a Virtual server without a pool and want pass the traffic to a server whith a iRule
My iRule have a global variables for get the ip server address and the port to redirect the traffic for this specific server
my rule that don´t run
when CLIENT_ACCEPTED {
log "origin IP address ===== $::ip_origen ===== port originao ==== $::puerto_origen ===="
LB::reselect $::ip_origen:$::puerto_origen
}
I try with reselect and another commands like translate but don´t run
My version it´s 10.1
Any ideas?
Thanks
3 Replies
- hoolio
Cirrostratus
Instead of using the LB::reselect command, you can use the node command to specify an arbitrary destination IP:port for the request.
node
http://devcentral.f5.com/wiki/default.aspx/iRules/node
Aaron - Salvador_del_ReHistoric F5 AccountThe final rule
rule acepta_conexiones {
when CLIENT_ACCEPTED {
log "la ip de origen es ===== $::ip_origen ===== y el puerto es ==== $::
puerto_origen ==== [IP::client_addr]"
set ip_destino $::ip_origen
set puerto_destino $::puerto_origen
log "puerto destino $puerto_destino ip_destino $ip_destino"
node $ip_destino $puerto_destino
}
The variables gets for the another rule applied to another VS
when CLIENT_ACCEPTED {
set ::ip_origen [IP::client_addr]
set ::puerto_origen [TCP::local_port]
snat 10.10.1.100
} - hoolio
Cirrostratus
I would be careful with setting a global variable based on the client IP address and VIP port on one virtual server and then using that on a separate virtual server to set the destination IP:port. If the first VIP hadn't been hit before the second VIP is, you'll get a TCL runtime error trying to use an undefined IP:port for the node command.
If you want help setting this up, can you elaborate on what you're trying to configure and why?
Thanks,
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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