Forum Discussion
Cl__i_14987
Nimbostratus
Jan 05, 2013How to monitor internal IP translate to which ip snat in pool
I have some issue about logging by iRule
external internal (server-pool)
server --------- F5 --------- server1, server2
2.2.2.100 1.1.1.100, 1.1.1.101
snat-pool: 2.2.2.251, 2.2.2.252
How can I know what the ip of snat-pool used to translate by which server in the server-pool?
iRule
Irule when SERVER_CONNECTED {
log local0. "client_addr [IP::client_addr]"
log local0. "remote_addr [IP::remote_addr]"
snatpool snat-pool
log local0. "client_addr [IP::client_addr]"
log local0. "remote_addr [IP::remote_addr]"
}
I tried this but it doesn't work it show only ip of server and destination server, doesn't show ip that be translated.
thank you
2 Replies
- nitass
Employee
e.g.[root@ve10:Active] config b virtual bar80 list virtual bar80 { snatpool mysnatpool pool foo destination 172.28.19.252:80 ip protocol 6 rules myrule } [root@ve10:Active] config b pool foo list pool foo { members 200.200.200.101:80 {} } [root@ve10:Active] config b snatpool mysnatpool list snatpool mysnatpool { members { 200.200.200.201 200.200.200.202 } } [root@ve10:Active] config b rule myrule list rule myrule { when SERVER_CONNECTED { log local0. "" log local0. "cs client [IP::client_addr]:[TCP::client_port]" log local0. "cs server [clientside {IP::local_addr}]:[clientside {TCP::local_port}]" log local0. "ss client [IP::local_addr]:[TCP::local_port]" log local0. "ss server [IP::remote_addr]:[TCP::remote_port]" } } [root@ve10:Active] config tail -f /var/log/ltm Jan 5 17:41:29 local/tmm info tmm[8623]: Rule myrule : Jan 5 17:41:29 local/tmm info tmm[8623]: Rule myrule : cs client 192.168.206.33:51080 Jan 5 17:41:29 local/tmm info tmm[8623]: Rule myrule : cs server 172.28.19.252:80 Jan 5 17:41:29 local/tmm info tmm[8623]: Rule myrule : ss client 200.200.200.201:51080 Jan 5 17:41:29 local/tmm info tmm[8623]: Rule myrule : ss server 200.200.200.101:80 - Cl__i_14987
Nimbostratus
It's work!!!!!
Thanks you so much
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