Forum Discussion
Fabou_139732
Nimbostratus
Mar 19, 2014SNAT to multiple addresses and ports
Hi Guys,
I have to create SNAT rule to allow some host to access external system, so they are hidden behind nated address.
I am planning to use virtual servers (Forwarding IP) for this, and...
JRahm
Admin
Mar 21, 2014you could do this with a simple iRule
when CLIENT_ACCEPTED {
switch [TCP::local_port] {
"80" -
"8080" -
"443" {
if { [IP::addr [IP::client_addr] equals 10.10.10.0/24] &&
([IP::addr [IP::local_addr] equals 172.16.31.5] ||
[IP::addr [IP::local_addr] equals 172.16.30.5]) } {
snat x.x.x.x
}
}
}
}
as you add more, it would make sense to move the data to a data group and use the class command to extract it. You might format like:
client_addr := snat_ip,dest_ip1,dest_ip2
so when you extract it based on client address, you can then get to each of the fields you need with the getfield command.
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