{% extends "base.html" %}

{% block title %}Defestri - {{ _('Commonly seen IPs and Subnets') }}{% endblock %}

{% block content %}
<section class="bans">
    <div class="container">

        <header>
            <h2>{{ _('Commonly seen IPs and Subnets') }}</h2>

        </header>

        <h3 style="padding-bottom: 10px;">{{ _('Common IPs') }}</h3>
        <table class="default">
            <thead>
                <tr>
                    <th>{{ _('IP') }}</th>
                    <th>{{ _('Location') }}</th>
                    <th>{{ _('Times seen') }}</th>
                </tr>
            </thead>
            <tfoot class="row-total">
                <td>{{ _('Total') }}:</td>
                <td colspan="3">{{ breakin_attempts|length }}</td>
            </tfoot>
            <tbody>
                {% for ipaddr in common_ips %}
                <tr>
                    <td>{{moment_js(breakin.date).format('L, LT')}}</td>
                    <td>{{ breakin.user }}</td>
                    <td>{{ breakin.ip.ip_addr }}</td>
                    <td>{{ breakin.ip.print_location() }}</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>

        <h3 style="padding-bottom: 10px;">{{ _('Bans') }}</h3>
        <table class="default">
            <thead>
                <tr>
                    <th>{{ _('When') }}</th>
                    <th>{{ _('IP') }}</th>
                    <th>{{ _('Location') }}</th>
                </tr>
            </thead>
            <tfoot class="row-total">
                <td>{{ _('Total')}}:</td>
                <td colspan="2">{{ bans|length }}</td>
            </tfoot>
            <tbody>

                {% for ban in bans %}
                <tr class="{{ loop.cycle('odd', 'even')}}">
                    <td>{{moment_js(ban.date).format('L, LT')}}</td>
                    <td>{{ ban.ip.ip_addr }}</td>
                    <td>{{ ban.ip.print_location() }}</td>
                </tr>
                {% endfor %}

            </tbody>
        </table>

        <!--<p><small>Automatically generated by the <a href="https://github.com/ardinor/misc/tree/master/auth-log%20parser">auth-log parser</a>.</small></p>-->

    </div>
</section>
{% endblock %}

Work on monitoring - display commonly seen IPs and subnets
Work on monitoring - display commonly seen IPs and subnets
