Forum Discussion
Renevdb_80118
Apr 13, 2012Nimbostratus
Change outgoing NAT
Hi,
Looking for the irule that can change the outgoing IP address based on destination, I've seen it but can't find it anymore.
Background: We have multiple local subnets which we use currently use for outgoing connections. We need to migrate this to an F5 LC but can't use the standard (S)NAT. Later this will be moved to BGP to allow us to provide only one entry to vendors as our originating address.
Thanks for any help.
- nitassEmployeeis it something like this?
when CLIENT_ACCEPTED { if { [class match -- [IP::local_addr] equals dest1_dg] } { snat 1.1.1.1 } elseif { [class match -- [IP::local_addr] equals dest2_dg] } { snat 2.2.2.2 } else { snat 3.3.3.3 } }
- Renevdb_80118NimbostratusThanks, yes that looks like what we are trying. Would it be possible to create pools for the sets1_dg and dest2_dg?
- hoolioCirrostratusYes, you could assign a specific pool in each clause.
when CLIENT_ACCEPTED { if { [class match -- [IP::local_addr] equals dest1_dg] } { snat 1.1.1.1 pool pool_a } elseif { [class match -- [IP::local_addr] equals dest2_dg] } { snat 2.2.2.2 pool pool_b } else { snat 3.3.3.3 pool pool_c } }
- Renevdb_80118NimbostratusWill something like this work?
- nitassEmployeedest1_dg and dest2_dg are data group containing destination ip address. why do you want to use pool (in class match) instead??
- Renevdb_80118NimbostratusWe will have multiple destinations which need the same originating address.
- nitassEmployeeWe will have multiple destinations which need the same originating address.
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