Commit 22f33c65 authored by David Johnson's avatar David Johnson
parent bdc2d63f
Pipeline #3062 passed with stages
in 15 seconds
Installation
============
(``nlsdn`` requires ``pyroute2`` and ``flask``; you can install these on
Ubuntu via ``apt-get install python-pyroute2 python-flask``.)
``nlsdn`` requires ``pyroute2`` and ``flask``. We've made some small
modifications to ``pyroute2`` at
https://gitlab.flux.utah.edu/safeedge/pyroute2 . If those are important
to you, you can install ``pyroute2`` from that repository, by running
``$ python setup.py install --user``
Otherwise, if you are running Ubuntu, you can install via
``$ apt-get install python-pyroute2 python-flask``.
You can install `nlsdn` in the normal way:
......
......@@ -173,10 +173,14 @@ of these keys (:py:obj:`nlsdn.server.sdn.RuleMatch.NL_KEYS`), like so:
curl -k -u admin:admin -H 'content-type: text/json' -X POST \
-d '{"type":"rule","priority":500,"src":"127.0.0.1","src_len":32, \
"sport":56789,"dst":"8.8.8.8","dst_len":32,"oifname":"wlp3s0", \
"sport_range":[56789,56789],"dst":"8.8.8.8","dst_len":32,"oifname":"wlp3s0", \
"action_id":500}' \
"${NLSDNSERVER}/match"
(Note that the use of the ``sport_range`` attribute currently requires
our forked version of ``pyroute2``, available at
https://gitlab.flux.utah.edu/safeedge/pyroute2 .)
This would create a ``rule`` (:py:class:`nlsdn.server.sdn.RuleMatch`)
``Match`` object that matches traffic from ``127.0.0.1:56789`` heading
to ``8.8.8.8`` via ``wlp3s0``, and direct it to the ``Action`` with ID
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment