Skip to content

Instantly share code, notes, and snippets.

@c1982
Created February 28, 2011 09:26
Show Gist options
  • Save c1982/847125 to your computer and use it in GitHub Desktop.
Save c1982/847125 to your computer and use it in GitHub Desktop.
Mikrotik API: Add Static Firewall Rule
using Mikrotik.Api;
namespace Usage
{
class Program
{
static void Main(string[] args)
{
var variable = new Firewall("192.168.2.8", "admin", "password")
.Chain(Targets.forward)
.Accept()
.SourceIp("178.18.193.21")
.Protocol(Protocols.tcp)
.Comment("Test Comment")
.Apply();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment