Select Git revision
06_modules.md
Forked from
Rafael László / Python Presentation
Source project has a limited visibility.
dyndns.html 2.43 KiB
{% extends 'base.html' %}
{% block title %}DynDNS @ SFeri{% endblock %}
{% block head_extensions %}
{% endblock %}
{% block content %}
<div class="slim_container">
<h1>Dynamic DNS</h1>
<p style="text-align: justify;">
<bold>What is DynDNS?</bold> Unless you are at Schönherz, your IP address probably updates from time to time.
With dynamic DNS, you can always point <code>your-domain.dyndns.sfphoton.tk</code> to your device.
</p>
<p style="text-align: justify;">
<bold>How to use?</bold> Register a new domain here and you will get a unique token. To update your IP address
on the DNS server, just visit <code>https://sferi.hu/dyndns-update?token=[your token]</code> manually or via a
script: <code>curl -4 'https://sferi.hu/dyndns-update?token=[your token]'</code>.
</p>
<p style="text-align: justify;">
You can even set a CNAME record for your DynDNS domain, if you own another domain name - so
<code>your-domain.com</code> will always point to your dynamic IP.
</p>
<p style="text-align: justify;">
<bold>Warning:</bold> You should keep your token a secret.
</p>
{% if recordsCount > 0 %}
<h2>Your DynDNS domains</h2>
<div style="overflow-x: auto;">
<table>
<tr>
<th>Domain</th>
<th>Token</th>
<th>Update link</th>
<th>Current IP</th>
</tr>
{% for r in records %}
<tr>
<th>{{ r['domain'] }}</th>
<th>{{ r['token'] }}</th>
<th><a href="https://sferi.hu/dyndns-update?token={{ r['token'] }}">link</a></th>
<th>{{ r['ip'] }}</th>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
<h2>Register a new domain</h2>
<form method="POST" action="{{ url_for('service', servicename='dyndns-register') }}" class="slim_container">
<section class="inputfield">
<label for="domainname">Domain name</label>
<input name="domainname" id="domainname" required>
<label>.dyndns.sfsrv.hu</label>
</section>
<section class="inputfield">
<input class="button" type="submit" value="Register">
</section>
</form>
{% if otherRecords != None %}
<h2>Other records</h2>
<div style="overflow-x: auto;">
<table>
<tr>
<th>User</th>
<th>Domain</th>
<th>Current IP</th>
<th>Last update</th>
</tr>
{% for r in otherRecords %}
<tr>
<th>{{ r['username'] }}</th>
<th>{{ r['domain'] }}</th>
<th>{{ r['ip'] }}</th>
<th>{{ r['lastupdate'] }}</th>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>
<div class="h-expander-3"></div>
{% endblock %}