Forum Discussion
Casa_Henry_1360
Nimbostratus
Feb 26, 2009Snat for mail servers
I am new to Irules and TCL. I have a need to create SNATs for my mail servers. What I am looking for is the syntax for parsing a field. So if I have a series of addresses defined as hosts
...
Casa_Henry_1360
Nimbostratus
Mar 16, 2009I also tried the ismith suggestion using the following:
when CLIENT_ACCEPTED {
if { [TCP::local_port] == 25} {
switch [ IP::client_addr ] {
192.168.246.151 { snat 198.212.12.151 }
192.168.246.150 { snat 198.212.12.150 }
default { forward } {
log local0. "[ IP::client_addr ] snatted"}
}
}
}
This generates the following error:
Mar 16 12:45:55 tmm tmm[1615]: 01220001:3: TCL error: snat_mail - extra switch pattern with no body while executing "switch [ IP::client_addr ] { 192.168.246.151 { snat 198.212.12.151 } 192.168.246.150 { snat 198.212.12.150 } default { forward } { l..."
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects