X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=blobdiff_plain;f=test%2FREADME;h=76c78fc5496794ecc4c47a61e8e2a75b2fab01c4;hp=e8d04684f6e547256eda11928537c01c1ba513e5;hb=HEAD;hpb=c0c871d8584339d0f13a8749c2900b8539e9f282 diff --git a/test/README b/test/README index e8d0468..76c78fc 100644 --- a/test/README +++ b/test/README @@ -1,46 +1,41 @@ -=A simple simulator to test our iptables rules= += A simple simulator to test our iptables rule generation = -==Invovation== +== Invocation == # ./fwtester.pl -This scans for subdirectory named test-* an invokes fwtester.pl -for each subdirectory with: +This scans for subdirectory named test-* an invokes fwtester.pl for each +subdirectory with: - # ./fwtester.pl test-/tests + # ./fwtester.pl test-/tests -==Test directory contents== +== Test directory contents == Each test directory can contain the following files: -*cluster.fw Cluster wide firewall config - -*host.fw Host firewall config + * cluster.fw Cluster wide firewall config + * host.fw Host firewall config + * .fw Firewall config for VMs + * tests Test descriptions -*.fw Firewall config for VMs +== Test description == -*tests Test descriptions - -==Test description== - -The test description file can contain one or more tests using -the following syntax: +The test description file can contain one or more tests using the following +syntax: { from => '' , to => '', action => '', [ source => '',] [ dest => '',] [ proto => '',] [ dport => ,], [ sport => ,] } The following definition exist currently: -* host: The host itself - -* outside: The outside world (vmbr0 port eth0) + * host: The host itself + * outside: The outside world (alias for 'vmbr0/eth0') + * vm: A qemu virtual machine + * ct: An openvz container + * nfvm: Non firewalled VM (alias for 'vmbr0/tapXYZ') + * vmbr<\d+>/: Unmanaged bridge port -* vm: A qemu virtual machine -* ct: An openvz container - -* nfvm: Non firewalled VM (vmbr port tapXYZ) - -==Test examples== +== Test examples == { from => 'outside', to => 'ct200', dport => 22, action => 'ACCEPT' } { from => 'vm101', to => 'vm100', dport => 443, action => 'ACCEPT', id => 'vm2vm'} @@ -48,4 +43,3 @@ The following definition exist currently: You can assign an 'id' to each test, so that you can run them separately: ./fwtester.pl -d test-basic1/tests vm2vm -