Forum Discussion
JasonC_40913
Nimbostratus
Jan 25, 2010Route Back to the Original Server through VIP
Hello everyone,
I received a request on establishing a very simple (but looks stupid) connection, but I don't really know how to make it successful. Hope someone could help here.
Source: One of the Load Balanced servers
Source IP: its own real IP
Destination: This server itself
Destination IP: Load Balanced VIP
I tried to use the following iRule but cannot make it
when CLIENT_ACCEPTED {
if { ([IP::addr [IP::client_addr] equals *source_ip*]) and ([IP::addr [IP::local_addr] equals *destination_vip*]) } {
node *source_ip*}
}
I know the requester has some limitations on the application so that he must work this way. Any idea how to solve this puzzle?
- hoolio
Cirrostratus
Hi Jason, - JasonC_40913
Nimbostratus
Hi Aaron, - hoolio
Cirrostratus
You would only need to use matchclass if you wanted to check if the remote port was in a datagroup. Also, TCP::remote_port in a clientside event like CLIENT_ACCEPTED will return the client's source port. TCP::local_port will check the client's destination port.when CLIENT_ACCEPTED { log local0. "[IP::client_addr]:[TCP::client_port]: New connection to [IP::local_addr]:[TCP::local_port]" if { ([IP::addr [IP::client_addr] equals 1.1.1.1]) and ([TCP::local_port] equals 80]) } { log local0. "[IP::client_addr]:[TCP::client_port]: Matched IP/port check" node [IP::client_addr] snat automap } }
- JasonC_40913
Nimbostratus
Thanks a lot Aaron! - hoolio
Cirrostratus
Great. Glad it's working for you.
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