首先 引入包:import org.apache.mina.filter.firewall.BlacklistFilter;
在建立连接的代码中加入:(师父交的~)
BlacklistFilter blacklistFilter=new BlacklistFilter();
InetAddress[] address= new InetAddress[1];
address[0]=InetAddress.getByName("169.254.11.186");
blacklistFilter.setBlacklist(address);
acceptor.getFilterChain().addFirst("black",blacklistFilter);