-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCheckInternalTables.cs
More file actions
37 lines (32 loc) · 1.02 KB
/
CheckInternalTables.cs
File metadata and controls
37 lines (32 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IPTables.Net.Iptables;
namespace IPTables.Net.Tests
{
public class CheckInternalTables
{
[Fact]
public void TestChains()
{
TestChain("filter", "INPUT");
TestChain("filter", "FORWARD");
TestChain("filter", "OUTPUT");
TestChain("mangle", "INPUT");
TestChain("mangle", "FORWARD");
TestChain("mangle", "OUTPUT");
TestChain("mangle", "PREROUTING");
TestChain("mangle", "POSTROUTING");
TestChain("nat", "PREROUTING");
TestChain("nat", "POSTROUTING");
TestChain("nat", "OUTPUT");
TestChain("raw", "PREROUTING");
TestChain("raw", "OUTPUT");
}
private void TestChain(string table, string chain)
{
Assert.True(IPTablesTables.IsInternalChain(table, chain), String.Format("{0}:{1} should be internal", table, chain));
}
}
}