Forum Discussion
Multiple Service Ports on a Single VS
- Apr 08, 2014
You would create 'service-port-range' as a string type data group under Local Traffic -> iRules -> Data Group List. Populate the data group with your port objects.
Then use the iRule to reference it and reject anything not in the list:
when CLIENT_ACCEPTED { if { ! [class match [TCP::local_port] equals service-port-range] } { reject } }
Hi,
I wanna allow only 4 TCP/UDP ports from single virtual. Is below IRULE configuration right?
rule allowing_tcp_udp_traffic_rl { when CLIENT_ACCEPTED { Check if requested port is allowing only TCP 443, TCP 80, UDP 4500 and UDP 500 if { ( [TCP::client_port] != 443 or [TCP::client_port] != 80 or [UDP::client_port] != 500 or [TCP::client_port] != 4500 ) } { Drop request drop } }
}
Thanks
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