Forum Discussion
Diego_19194
Nimbostratus
Jul 19, 2007SMTP modify a character in the packet
Hello people,
I have a problem that I need to send a MSISDM in a SMTP packet, but I must to modify the number, it meam remove one number.
Then only option we see is to create an iRule at Bigip, modifying SMTP information in order to modify destination address, originating address and also at the body of the msg removing the "9".
I want to convert for example:
RCPT TO:+5491158538565 -->RCPT TO:+541158538565
I found the irules attached where I will do a SMTP_proxy_iRule, and another sample that check some MSISDN in the body of the packet TCP. Due to the BIG-IP doesn't have libraries to modify the SMTP.
My question is simple, how can I modify the SMTP packet (header and body) to remove this number?
- Diego_19194
Nimbostratus
I was working ofr a few days with that and I found how can do the iRule. - hoolio
Cirrostratus
If you are trying to force the BIG-IP to use the VIP address as a source IP for traffic to the pool, you can create a SNAT pool with the VIP address and assign it under the VIP properties for SNAT. Or you could add the command 'snat 1.2.3.4' to your iRule where 1.2.3.4 is the VIP address. - Diego_19194
Nimbostratus
You didn't understand. - Diego_19194
Nimbostratus
I tested adding the "snatpool snat-Pool-to-Mobile" in "when CLIENT_ACCEPTED" and "when SERVER_CONNECTED", but the sender IP is wrong again. I think that when check in the virtual server the rule is not applied in the right moment. - Diego_19194
Nimbostratus
Now, the connection is working. The problem is a line that say "node * monitor icmp", because of the server is not answer the ping then BIGIP established as down and it didn't forward traffic to it. - hoolio
Cirrostratus
Good to hear that you got the network portion working as you want. - Diego_19194
Nimbostratus
Thank you very much. - hoolio
Cirrostratus
Hi, - Diego_19194
Nimbostratus
My rule: - Deb_Allen_18Historic F5 AccountSince you're replacing the original payload, you have to replace the original data length, not the length of the new data. Try using this for the TCP::payload replacement commands instead:
TCP::payload replace 0 [TCP::payload length] $sdata
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