问题
I have an application (.war) deployed in a Websphere Application Server v8. This app consists in a web application which is accessed by browser.
Now I have an IP Address that I want to ban but I don't find the option in the Administrative Console. Where I should ban this ip for to avoid the access this specifically application?
回答1:
In WebSphere you have 2 options (depends if you directly access app server or through http server):
1 Directly via WebSphere admin console.
Go to:
- Application servers > server1 > Web container transport chains > WCInboundDefault > TCP inbound channel (TCP_2)
- In the
Address exclude list
enter client addresses you want to block - restart the server
2 Use IBM HTTP Server (based on Apache) and WebSphere Plugin, which is available with WebSphere and define Deny list using standard httpd.conf configuration.
回答2:
Probably an IP filter isn't implemented by default in your application server, but it's easy enough to include an IP filter implemented in a servlet filter.
There's a nice intro to what filters can do on the Oracle site and plenty of readymade IP filters all over the web, like here or here. As you can see, the code needed is pretty simple, and as servlet filters are part of the EE spec, the result is portable between appservers as well.
来源:https://stackoverflow.com/questions/24137145/ban-ip-for-deny-access-to-an-app