Forum Discussion
A__Gotink_33511
Nimbostratus
Feb 20, 2014iRule to allow by source mac address ?
We have probably 1000 printers in our company that send smtp email to our BigIP loadbalancer. We want to restrict access for (other) applications to the smtp virtual server, so want to use a whitelis...
A__Gotink_33511
Nimbostratus
Jul 01, 2014This iRule works for me
when SERVER_CONNECTED {
clientside { TCP::collect }
}
when CLIENT_DATA {
set hostOK RK
set payload [string toupper [TCP::payload]]
log local0. "payload=$payload"
if { $payload starts_with "EHLO" } {
log local0. "EHLO found"
if { $payload contains "EHLO $hostOK" } {
log local0. "SMTP OK, is from $hostOK*"
TCP::release
}
else {
log local0. "SMTP ERROR, $payload is NOT from $hostOK"
TCP::respond "550 Hostname denied\r\n"
}
} else {
log local0. "EHLO not found"
TCP::release
TCP::collect
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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