Fantastic! Starting to see some things working. I still have a few follow-up questions to get some last parts working. (for those following along at home and who may, like me, not be fully F5 literate, I will put what I have done at the end of this post).
I am now able to get an outbound connection and have it route properly.
I first had to create the Virtual Server you mentioned. I then had to change the class from "snat_address snat_gateway" to "pre_snat_address snat_gateway":
class snat_gw {
"10.10.10.10 62.2.2.1"
}
It then worked!!!!!!!!!!!!!!!!!!!!!
My questions are 3. I am overjoyed that this is working. My questions are on ways to simplify things as we have hundreds of these types of situations. The last admin never noticed that half our routing was broken and I am trying to clean it up after-the-fact.
1. Is there a way I can change this to trigger off of networks instead of just host IPs? (i.e. "10.10.10.0/255.255.255.0 62.2.2.1)?
2. Is there a way to get it to trigger after the SNAT instead of before?
3. All of the systems that used the default router broke when I applied the rule as I did not have all of my sytems and routers defined (we have a lot). Is there a way to define a default gateway in the iRule?
As for the logs, it looks as if the iRule is triggering before NAT. A sample from the logs is (IP addresses modified to protect the innocent):
May 2 14:37:16 tmm tmm[3038]: 01220002:6: Rule Test_SNAT :
My client IP is 10.10.30.10
May 2 14:37:21 tmm tmm[3038]: 01220002:6: Rule Test_SNAT :
My client IP is 10.0.0.90
May 2 14:37:21 tmm tmm[3038]: 01220002:6: Rule Test_SNAT :
My gateway is 62.2.2.1 and my client IP is 10.10.10.10
For those following along, a fuller description of the steps I took is:
1. I created a Pool that contained the T1 router I wanted to use. I figure I will expand this pool to include all of my T1 routers (and my default router), but for now I only put in one.
2. I created a Network Forwarding Virtual Server:
o Virtual Servers -> Create
Type: Network
Address: 0.0.0.0
Mask: 0.0.0.0
Service Port: 0 (* All ports)
VLAN Traffic: enables on (internal only)
Address Translation: unchecked
Port Translation: unchecked
Default Pool: The T1 router pool I created in step 1
iRules: set to use my Test_SNAT irule
3. I setup a SNAT rule to translate 10.10.10.10 to 62.2.2.10
4. I then watched the logs and saw that my gateway was never being set. So, I changed the class and put in my pre-SNAT address of 10.10.10.10. At this point, the outbound routing started to work.