mnscript
StringResult Firewall.Allow(string)
Description ​
Allows an IP to communicate with your terminal.
Arguments ​
string
- The IP address
Returns ​
StringResult
- StringResult representing the success or failure of this operation
Example ​
msc
using System;
using Console;
using Firewall;
using Application;
//Request Admin Perms
Application.RequestAdminPrivilege();
string IP = "1.1.1.1";
StringResult allow = Firewall.Allow(IP);
if ( allow.GetResult() ) {
Console.WriteLine("Allowed connections from "..IP);
} else {
Console.WriteLine("Error: "..allow.GetString());
}