Forum Discussion
cbarnett_13782
Nimbostratus
Feb 16, 2009Block ssl requests by ip
We need to test out a website befor we roll it out to production. So to test we want to only allow certian IP addresses accessing a virtual server. I have this working nicely for the HTTP virtual serv...
hoolio
Cirrostratus
Feb 16, 2009Possibly. What are the symptoms of the failure? Do you see any errors logged in /var/log/ltm? Can you add debug logging to the iRule to see what's happening?
when CLIENT_ACCEPTED {
log local0. "[IP::client_addr]:[TCP::client_port]: New TCP connection established."
Check if client IP is part of the subnet we want to allow
if {[IP::addr [IP::client_addr] equals 10.0.0.0/8]}{
Specify the pool
log local0. "[IP::client_addr]:[TCP::client_port]: Legal IP. Connection allowed to pool."
pool WEBPOOL
} else {
Reset the TCP connection
log local0. "[IP::client_addr]:[TCP::client_port]: Invalid IP. Resetting TCP connection."
reject
}
}
Aaron
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
