| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- {% extends "base.html" %}
- {% block header_title %}Firewall Dashboard{% endblock %}
- {% block section_title %}Firewall Dashboard{% endblock %}
- {% block debug %}
- {{ firewall }}
- {{ firewall_name }}
- {% endblock %}
- {% block content %}
- {% if firewall %}
- <table border="1" width="100%">
- <tr><th>rule #</th><th>description</th><th>protocol</th><th>destination port</th><th>source port</th><th>action</th></tr>
- {% for key, value in firewall.items %}
-
- {% for ifkey, ifvalue in value.items %}
- <tr>
- <td><a href="{% url 'firewall:show' ifkey %}">{{ ifkey }}</a></td>
- <td>{{ ifvalue.description }}</td>
- <td>{{ ifvalue.protocol }}</td>
- <td>{{ ifvalue.destination.port }}</td>
- <td>{{ ifvalue.source.port }}</td>
- <td>{{ ifvalue.action }}</td>
- </tr>
- {% endfor %}
-
- {% endfor %}
- </table>
- {% else %}
- <p>No firewalls.</p>
- {% endif %}
- <h2>Create new rule</h2>
- <form action="{% url 'firewall:addrule' firewall_name %}" method="post">
- {% csrf_token %}
-
- <p>
- <label for="alias">rule number</label><br>
- <input type="text" name="rulenumber" id="rulenumber" value="{{ rulenumber }}" size="5">
- </p>
-
- <p>
- <label for="hostname">action</label><br>
- <input type="radio" name="action" id="action" value="accept"> accept
- <input type="radio" name="action" id="action" value="drop"> drop
- <input type="radio" name="action" id="action" value="reject"> reject
- </p>
- <p>
- <label for="hostname">protocol</label><br>
- <input type="radio" name="protocol" id="protocol" value="tcp"> tcp
- <input type="radio" name="protocol" id="protocol" value="udp"> udp
- </p>
-
- <p>
- <label for="alias">destination port</label><br>
- <input type="text" name="destinationport" id="destinationport" value="{{ destinationport }}" size="5">
- </p>
-
- <p>
- <label for="alias">source port</label><br>
- <input type="text" name="sourceport" id="sourceport" value="{{ sourceport }}" size="5">
- </p>
-
-
- <input type="submit" value="Add Rule">
- </form>
-
- {% endblock %}
|