Forum Discussion
SergeGhanem_121
Nimbostratus
Mar 21, 2013No NAT for a specific URL request
Hi,
We have to write an iRule, if the destination is a specific URL (4shared,…), the source IP should remain the same, it should not nat this type of traffic.
Any Idea??
Thanks.
3 Replies
- nitass
Employee
you can check uri using HTTP::uri and disable snat using "snat none".
HTTP::uri wiki
https://devcentral.f5.com/wiki/irules.http__uri.ashx
snat wiki
https://devcentral.f5.com/wiki/irules.snat.ashx - SergeGhanem_121
Nimbostratus
Thanks a lot for your reply nitass,
i am a little bit new with irules. Do you think with the below syntax it will work ?
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "google.com" } {
snat none
}
}
Thanks for your advise. - nitass
Employee
if it is host name, you should use HTTP::host instead of HTTP::uri.
5-Minute iRules: What’s a URL? by Jason
https://devcentral.f5.com/blogs/us/5-minute-irules-what-rsquos-a-url
e.g.when HTTP_REQUEST { if { [HTTP::host] ends_with "google.com" } { snat none } }
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