liccccboeh_3569
Mar 27, 2018Nimbostratus
wildcard VS and SNAT
Hey!
I'm trying to write a SNAT irule for a wildcard virtual server(Forwarding IP), so if it's RFC1918 address don't do snat and when it's any other then snat outside interface float ip. The F5 "snat automap" doesn't work really well - so it sometimes works, sometimes doesn't.
This is what i've come up to this point. Is this kinda thing even possible what I'm trying to achieve?
when CLIENT_ACCEPTED {
switch [IP::remote_addr] {
10.0.0.0/8 {
snat none }
172.16.0.0/12 {
snat none }
192.168.0.0/16 {
snat none }
default {
snat 8.8.8.8 }
}
}
Thanks!