Forum Discussion
Jliz_44390
Nimbostratus
Jul 27, 2007Matching Source and Destination for NAT
I've let this simple problem drive me nuts now for a day and half and I've yet to find the solution.
I'm trying to NAT when a request is made from a server behind the LB to a VIP on the same LB. All other traffic except this specific source to destination network I want to leave unchanged.
I have real servers on 10.100.104.x/24 and the VIPs are on 10.100.100.x/24.
I figured this iRule thing can't be to difficult so I started reading up. I think I'm close so if someone could shed some light at where I screwed up that would be great.
Here is what I have so far.
when LB_SELECTED {
if {[IP::addr [IP::client_addr]/24 equals 10.100.104.0] } { [IP::server_addr]/24 equals 10.100.100.0]}
snat automap
}
Thanks in advance for the help.
-John
- Deb_Allen_18Historic F5 AccountYou can set up a selective SNAT instead of using an iRule.
- Esa_Kuusisto_27
Nimbostratus
Hi - hoolio
Cirrostratus
You could pass traffic through the BIG-IP more programmatically by creating a forwarding IP virtual server with a fastL4 profile. You can then conditionally forward requests based on source IP or network and/or destination IP or network. - Esa_Kuusisto_27
Nimbostratus
when CLIENT_ACCEPTED { if { ( [matchclass [IP::client_addr] equals $::NattedNetwork] ) and [matchclass [IP::remote_addr] equals $:rivateNetwork]}{ forward } elseif { [matchclass [IP::client_addr] equals $::NattedNetwork] }{ snat automap } else { forward } }
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