Allow specific IP access to server, rejecting all others

We have a situation where bots or hackers are trying to access our RO servers from an unused IP, but the RO server(s) is not releasing the connections. Eventually, those connections build up and the server hangs.

I am currently using TROIndyHTTPServer/TROWinInetHTTPChannel.

While looking at your docs, I found OnManualBindSocket as a possible solution, but that even isn’t available for TROIndyHTTPServer. In addition, for those servers where that is available the examples here in Talk don’t work or I’m missing something

Socket4.Bind(‘127.0.0.1’, Port);

Could you provide an example of how to accomplish this or provide another solution?

Hi,

for IndyHTTPServer you can use native Indy properties like

var
  k: TIdSocketHandle;
begin
  k := ROServer.IndyServer.Bindings.Add;
  k.IP := '127.0.0.1';
  k.IPVersion :=Id_IPv4;
  k.Port := 8099;

  ROServer.Active := true;

That was quick. Thanks!