add regression tests for ipfilter

This commit is contained in:
Dietmar Maurer 2014-06-12 08:32:11 +02:00
parent 66f33d78ed
commit a306a176c4
3 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,13 @@
[options]
enable: 1
[ipset ipfilter-net0]
1.2.3.4
1.2.3.5
[ipset ipfilter-net2] # empty, allow nothing
[rules]
IN ACCEPT -p tcp -dport 80

View File

@ -0,0 +1,7 @@
[options]
enable: 1
[rules]
IN ACCEPT -p tcp -dport 80 -source 1.2.3.0/24

View File

@ -0,0 +1,15 @@
{ from => 'vm100i1', source => '1.2.3.3', dport => 80, action => 'ACCEPT' }
{ from => 'vm100i1', source => '1.2.3.4', dport => 80, action => 'ACCEPT' }
{ from => 'vm100i1', source => '1.2.3.5', dport => 80, action => 'ACCEPT' }
{ from => 'vm100i1', source => '1.2.3.6', dport => 80, action => 'ACCEPT' }
{ from => 'vm100', source => '1.2.3.3', dport => 80, action => 'DROP' }
{ from => 'vm100', source => '1.2.3.4', dport => 80, action => 'ACCEPT' }
{ from => 'vm100', source => '1.2.3.5', dport => 80, action => 'ACCEPT' }
{ from => 'vm100', source => '1.2.3.6', dport => 80, action => 'DROP' }
{ from => 'vm100i2', source => '1.2.3.3', dport => 80, action => 'DROP' }
{ from => 'vm100i2', source => '1.2.3.4', dport => 80, action => 'DROP' }
{ from => 'vm100i2', source => '1.2.3.5', dport => 80, action => 'DROP' }
{ from => 'vm100i2', source => '1.2.3.6', dport => 80, action => 'DROP' }