Forum Discussion
Nick_68091
Nimbostratus
Feb 17, 2009RPC iRule
All,
I am new to this for sure. I am trying to do an iRule that will allow RPC traffic to pass to a single VIP with one pool associated to it. I have tried the two iRules below with no success:
===================================
when CLIENT_ACCEPTED {
if { [TCP::server_port] == 135 }
{
forward
}
elseif { [TCP::server_port] > 1023 and [TCP::server_port] < 65534 }
{
forward
}
else {
discard
}
}
==================================
when CLIENT_ACCEPTED {
if { [TCP::local_port] == 135 or \
( [TCP::local_port] >= 1024 and [TCP::local_port] < 65534 ) } {
forward
} else {
discard
}
}
==================================
Any ideas??
Thanks,
Nick
- hwidjaja_37598
Altostratus
What type of Virtual Server (or VIP) is this iRule applied to? Without this iRule applied, are you able to access the pool? - hoolio
Cirrostratus
As Humphrey is hinting at, using the forward command (Click here) will bypass load balancing and cause LTM to send the packets to the same IP and port that the client requested. So you wouldn't want to use this on a standard IP VIP if you want the request to be load balanced to the pool. If you are wanting to use a pool, you can change the iRule slightly:when CLIENT_ACCEPTED { if { [TCP::local_port] == 135 or ( [TCP::local_port] >= 1024 and [TCP::local_port] < 65534 ) } { Do nothing. The default pool on the VIP will be used. } else { Drop the packets. discard } }
- Nick_68091
Nimbostratus
Hoolio / Humphrey I can't thank you guys enough. That makes perfect sense. Thanks a ton. - Nick_68091
Nimbostratus
Guys I must still be missing something and my bad for not providing more details. I have a VIP setup for TCP 135 and I want the portmapper traffic to be allowed through less I create 65k VIP's. I applied what you mentioned Hoolio, but I still can't get the portmapper ports (<1023) to pass through the LTM. Here is more detailed information: - hoolio
Cirrostratus
Do you want all traffic sent to the pool members on port 135 or the port that the client made the request to? If the latter, you'll need to change the pool members to listen on port 0 (any).
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