Forum Discussion
iRule for 1-to-1 NAT
I have two ISP connections (ISP 1 and ISP 2) setup in a wildcard outbound VC called Internet. Creative I know. I also have a single NAT setup for a Polycom Teleconference unit. I used a NAT to keep it on ISP1 only for inbound traffic reasons (better bandwidth). The problem is that randomly the polycom does not work. After testing we found that the outbound traffic is still load balancing (ie going out the wrong connection sometimes), so when traffic leaves through ISP 2, video stops working.
NAT inside 10.10.7.3 to outside 123.123.123.111
Tech support recommended an iRule but I can't seem to get this to work. So, I have the following rule added to the Internet VC:
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 10.10.7.3 ] }{
snat 123.123.123.111
pool ISP1-Only
}
}
*(ISP1-only pool only has the ISP1 gateway in it.)
Any ideas on what is going wrong?
Thanks,
Todd
11 Replies
- Mohamed_Lrhazi
Altocumulus
I would start by adding a log statement to that CLIENT_ACCEPTED, to log the client IP and make sure it actually is matching. - What_Lies_Bene1
Cirrostratus
Can you explain what 'can't get it to work' means in more detail please, if removing the snat statement doesn't solve your issue. - Todd_93078
Nimbostratus
I removed the SNAT but no change. I will start reading up on the log statement to see how that works. Sorry, really new to this still. - What_Lies_Bene1
Cirrostratus
For the IP address logging, I'd put this before the first if statement; - Todd_93078
Nimbostratus
Sorry, - What_Lies_Bene1
Cirrostratus
Good stuff, you're welcome. - Todd_93078
Nimbostratus
Well turns out I just broke the return traffic, now that we tried to use it for inbound calls. Is there a way to use a "nat 123.123.123.111" statement instead of snat? I was trying to keep this simple and I have no idea how to create a 1-to-1 IP rule with virtual servers yet. - What_Lies_Bene1
Cirrostratus
The return traffic? Inbound calls? Are you initiating connections from the server now too? Please clarify the traffic flow which does and doesn't work. - Todd_93078
Nimbostratus
Sorry for the confusion, - Todd_93078
Nimbostratus
FYI,
Recent Discussions
Related Content
* 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