Forum Discussion
Roark_Fisher_29
May 02, 2006Nimbostratus
Thank you. I think this is close to working.
I added the following to the /config/bigip.conf file (fake IPs given):
class snat_gw {
"62.2.2.10 62.2.2.1"
}
I did a "bigpipe load" and then verified that the new class showed up in the datagroups portion of the iRules.
I then created the following iRule (Test_SNAT):
when CLIENT_ACCEPTED {
set my_gw [findclass [IP::client_addr] $::snat_gw " "]
if { $my_gw ne "" } {
node $my_gw
} else { discard }
}
and it created successfully. So far so good.
Things broke as I tried to associate the iRule.
Here is some further clarification of what I have.
I have a Host Virtual Server that redirects traffic on port 80 to 62.2.2.10 to the internal system (10.10.10.10).
I have a SNAT rule that converts 10.10.10.10 to 62.2.2.10.
Now the Host Virtual Server on port 80 works great and the web pages serve up properly.
The problem is if I want to send email out from 10.10.10.10. Since the email originates from 10.10.10.10, I need it to SNAT to a real address and then route through the correct gateway. Right now it is using the default gateway and the packets get dropped.
I did not find a place where I could associate the iRule with the SNAT. I tried to associate the iRule to the Host Virtual Server but then it stopped serving web pages so I had to take it out.
Can you tell me how to associate the iRule with the SNAT? Or do I have to create a different type of virtual server?
Thanks again for your help.