¿Te refieres al firewall?
Algo así:
Código Delphi
[-]
uses
Winapi.Windows, Winapi.ShellAPI, System.SysUtils;
procedure AddFirewallRule;
var
Command: string;
begin
Command := 'netsh advfirewall firewall add rule name="Firebird 3050" dir=in action=allow protocol=TCP localport=3050';
ShellExecute(0, 'open', 'cmd.exe', PChar('/C ' + Command), nil, SW_HIDE);
end;
begin
try
AddFirewallRule;
Writeln('Regla de firewall añadida.');
except
on E: Exception do
Writeln('Error: ', E.Message);
end;
end.