Michael_107360
Jun 23, 2017Cirrus
2 SNAT or not 2 SNAT
I need help here trying to modify an Irule for a forwarding virtual server
4 conditions:
-
Destination Ip is in one of the listed subnets then SNAT NONE
-
Specific IP address of Server is Listed SNAT as specified
-
If Destination Ip is a listed subnet then SNAT as specified
-
If none of the first three conditions are met then TCP:close do not pass go do not collect $200.00 drop the packet.
when CLIENT_ACCEPTED {
if {
switch [IP::addr [getfield [IP::local_addr] "%" 1] {
172.23.0.0/16 -
10.0.0.0/8 -
192.168.1.0/24 -
192.168.2.0/24 -
192.168.3.0/24 -
192.168.4.0/24 { snat none }
}
}
elseif {
switch [IP::addr [IP::client_addr] {
192.168.5.6%1 { snat 192.168.100.5 }
192.168.5.7%1 { snat 192.168.100.13 }
192.168.5.8%1 -
192.168.5.9%1 { snat 192.168.100.12 }
192.168.5.10%1 -
192.168.5.11%1 { snat 1192.168.100.11 }
}
}
elseif {
if {[IP::addr [getfield [IP::local_addr] "%" 1] equals 104.129.194.0/24] } { snat 192.168.100.195 }
}
else { TCP:close } }