Ban ip for deny access to an app

余生颓废 提交于 2020-01-06 17:25:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!