Forum Discussion
Help Port redirection
I am new about IRule and facing a difficulty. Could anyone help me out? Thank you very much.
My scenarios is
there are two nodes in my pool and I want to use IRule to distribute the traffic to different node based on the incoming port to the same destination port 22.
My IRule is below
when CLIENT_ACCEPTED {
switch [TCP::local_port] {
"5810" { pool newpool member 192.168.1.1 22 }
"5811" { pool newpool member 192.168.1.2 22 }
}
}
After I deploy this IRule, I find there is no traffic from 5810 on my laptop to port 22 on my destination(192.168.1.1) but there is traffic to 5810 which is not being used by any application when I telnet from my laptop.
Above all I can not achieve my goal. Is there anything wrong in my IRule to stop traffic from 5810 to 22?
Do you have any idea about this? Looking forward to see your reply soon.
Thank you and HELP......
- hoolioCirrostratusHi Touch,
when CLIENT_ACCEPTED { log local0. "[IP::client_addr]:[TCP::client_port]: Connection to [virtual name] [IP::local_addr]:[TCP::local_port]" switch [TCP::local_port] { "5810" { pool newpool member 192.168.1.1 22 log local0. "[IP::client_addr]:[TCP::client_port]: Matched 5810" } "5811" { pool newpool member 192.168.1.2 22 log local0. "[IP::client_addr]:[TCP::client_port]: Matched 5810" } } } when SERVER_CONNECTED { Debug event only. Remove when done testing log local0. "[IP::client_addr]:[TCP::client_port]: Connected to [IP::server_addr]:[TCP::server_port]" }
- touch_93816NimbostratusHi Hoolio
- touch_93816NimbostratusHi Hoolio
Recent Discussions
Related Content
* 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