diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2003-05-11 01:56:15 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2003-05-11 01:56:15 +0000 |
commit | a699d686bbf0e22f403e81e561ae8dbddfd0ccd7 (patch) | |
tree | 94b58029e39f67c3cceae11031b1b84afd8edd2c | |
parent | 21a5e41f8fb757e55d0d7538b6e88c7a08864775 (diff) |
Regress tests for explicit nat translation port.
-rw-r--r-- | regress/sbin/pfctl/Makefile | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf66.in | 10 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf66.loaded | 30 | ||||
-rw-r--r-- | regress/sbin/pfctl/pf66.ok | 6 |
4 files changed, 49 insertions, 3 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile index 90bf8eaa407..e956bdf0a83 100644 --- a/regress/sbin/pfctl/Makefile +++ b/regress/sbin/pfctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.135 2003/05/03 17:01:47 henning Exp $ +# $OpenBSD: Makefile,v 1.136 2003/05/11 01:56:14 mcbride Exp $ # TARGETS # pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok @@ -12,13 +12,13 @@ PFTESTS=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 PFTESTS+=28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 -PFTESTS+=51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 +PFTESTS+=51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 PFFAIL=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 PFFAIL+=28 29 30 31 32 33 34 35 36 PFSIMPLE=1 2 PFSETUP=1 2 3 4 PFLOAD=1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 -PFLOAD+=30 31 32 34 36 38 39 40 44 46 47 48 49 54 56 60 61 65 +PFLOAD+=30 31 32 34 36 38 39 40 44 46 47 48 49 54 56 60 61 65 66 PFALTQ=1 2 3 4 5 6 7 8 9 10 11 12 13 14 # disabled; no altq in anchors # PFLOAD+=33 35 37 42 43 45 51 58 59 62 63 64 diff --git a/regress/sbin/pfctl/pf66.in b/regress/sbin/pfctl/pf66.in new file mode 100644 index 00000000000..1be348f9503 --- /dev/null +++ b/regress/sbin/pfctl/pf66.in @@ -0,0 +1,10 @@ +# test specified nat translation ports + +nat on lo0 from 192.168.1.1 to any -> 10.0.0.1 port 500 +nat on lo0 proto tcp from 192.168.1.2 to any -> 10.0.0.2 port 1000:5000 +nat on lo0 proto udp from 192.168.1.3 to any -> 10.0.0.3 port 5000:1000 +nat on lo0 proto udp from 192.168.1.4 to any -> 10.0.0.4 port 50000:50000 +nat on lo0 proto tcp from 192.168.1.2 to any -> 10.0.0.2 port www:5000 +nat on lo0 proto udp from 192.168.1.3 to any -> 10.0.0.3 port 5000:www + + diff --git a/regress/sbin/pfctl/pf66.loaded b/regress/sbin/pfctl/pf66.loaded new file mode 100644 index 00000000000..900faa43705 --- /dev/null +++ b/regress/sbin/pfctl/pf66.loaded @@ -0,0 +1,30 @@ +@0 nat on lo0 inet from 192.168.1.1 to any -> 10.0.0.1 port 500 +[ Skip steps: i=end d=end f=end sp=end da=end dp=end ] +[ queue: qname= qid=0 pqname= pqid=0 ] +[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] + +@1 nat on lo0 inet proto tcp from 192.168.1.2 to any -> 10.0.0.2 port 1000:5000 +[ Skip steps: i=end d=end f=end sp=end da=end dp=end ] +[ queue: qname= qid=0 pqname= pqid=0 ] +[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] + +@2 nat on lo0 inet proto udp from 192.168.1.3 to any -> 10.0.0.3 port 5000:1000 +[ Skip steps: i=end d=end f=end p=4 sp=end da=end dp=end ] +[ queue: qname= qid=0 pqname= pqid=0 ] +[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] + +@3 nat on lo0 inet proto udp from 192.168.1.4 to any -> 10.0.0.4 port 50000 +[ Skip steps: i=end d=end f=end sp=end da=end dp=end ] +[ queue: qname= qid=0 pqname= pqid=0 ] +[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] + +@4 nat on lo0 inet proto tcp from 192.168.1.2 to any -> 10.0.0.2 port 80:5000 +[ Skip steps: i=end d=end f=end sp=end da=end dp=end ] +[ queue: qname= qid=0 pqname= pqid=0 ] +[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] + +@5 nat on lo0 inet proto udp from 192.168.1.3 to any -> 10.0.0.3 port 5000:80 +[ Skip steps: i=end d=end f=end p=end sa=end sp=end da=end dp=end ] +[ queue: qname= qid=0 pqname= pqid=0 ] +[ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] + diff --git a/regress/sbin/pfctl/pf66.ok b/regress/sbin/pfctl/pf66.ok new file mode 100644 index 00000000000..d49d56af701 --- /dev/null +++ b/regress/sbin/pfctl/pf66.ok @@ -0,0 +1,6 @@ +nat on lo0 inet from 192.168.1.1 to any -> 10.0.0.1 port 500 +nat on lo0 inet proto tcp from 192.168.1.2 to any -> 10.0.0.2 port 1000:5000 +nat on lo0 inet proto udp from 192.168.1.3 to any -> 10.0.0.3 port 5000:1000 +nat on lo0 inet proto udp from 192.168.1.4 to any -> 10.0.0.4 port 50000 +nat on lo0 inet proto tcp from 192.168.1.2 to any -> 10.0.0.2 port 80:5000 +nat on lo0 inet proto udp from 192.168.1.3 to any -> 10.0.0.3 port 5000:80 |