Created
February 28, 2011 09:26
-
-
Save c1982/847125 to your computer and use it in GitHub Desktop.
Mikrotik API: Add Static Firewall Rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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