Skip to content

Commit 44b4ee9

Browse files
committed
protocol enforcement
1 parent 65b074a commit 44b4ee9

5 files changed

+59
-0
lines changed

images/zorp_audit_http_middle.png

415 KB
Loading

index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Zorp GPL Tutorial
55
.. toctree::
66

77
introduction
8+
simple_use_cases
89

910
.. only:: html
1011

simple_use_cases.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
----------------
2+
Simple Use Cases
3+
----------------
4+
5+
.. toctree::
6+
7+
usecase_protocol_enforcement

sources/http_proxy_transparent.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from Zorp.Http import * #1
2+
3+
def default_instance():
4+
Service(name='service_http_transparent', #2
5+
proxy_class=HttpProxy
6+
)
7+
Rule(service='service_http_transparent', dst_port=80, #3
8+
src_zone=('clients', ),
9+
dst_zone=('servers', )
10+
)

usecase_protocol_enforcement.rst

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
====================
2+
Protocol Enforcement
3+
====================
4+
5+
Use case
6+
========
7+
8+
.. index:: single: protocol;HTTP
9+
10+
The most common use case of a proxy firewall -- including *Zorp* -- nowadays is to rule the Internet, means take control over the *HTTP* traffic. This is a simple, but good example to show the advantage of a proxy firewall technology. When the system administrator has to grant access to the World Wide Web, usually only one rule is created, which opens port 80 to the Internet. It solves the original problem, but generates another one. With the help of this rule anybody can access any kind of service of any server on the port 80 independently from the fact, that it is a *web* service or not.
11+
12+
Solution
13+
========
14+
15+
The application level solution of the problem is enforcing the *HTTP* protocol on the traffic on the destination port 80. It is easy with *Zorp*, because there is a predefined proxy (``HttpProxy``) to enforce the *HTTP* protocol. We only have to start a *service* which sets this *proxy* as ``proxy_class`` parameter, when the traffic meets the mentioned requirements.
16+
17+
.. literalinclude:: sources/http_proxy_transparent.py
18+
:language: python
19+
:emphasize-lines: 1,4,7
20+
21+
1. Imports anything from the \texttt{Zorp.Http} module, which makes it possible to use *HttpProxy*-related names without any prefix.
22+
2. Creates a simple *service* with the name ``service_http_transparent``, which uses the predefined ``HttpProxy`` of *Zorp*.
23+
3. Creates a *rule* with the necessary conditions, traffic from *zone* ``clients`` to *Zone* ``servers`` targets the port 80 and starts a *service* named ``service_http_transparent``.
24+
25+
Result
26+
======
27+
28+
The result is as simple as possible. The traffic goes through a transparent service without the client or the server being aware of that, while the *HTTP* protocol is enforced by the ``HttpProxy`` of *Zorp*.
29+
30+
.. only:: latex
31+
32+
.. figure:: images/zorp_audit_http_middle.png
33+
:scale: 75
34+
35+
Transparent HTTP proxy
36+
37+
.. only:: html
38+
39+
.. raw:: html
40+
41+
<iframe width="853" height="480" src="http://www.youtube.com/embed/ohkpUAgt05k?list=SPE040858BE2F7D34C" frameborder="0" allowfullscreen></iframe>

0 commit comments

Comments
 (0)