Skip to content
Snippets Groups Projects
Select Git revision
  • fbe2bc2c340c4041a28c8613b1b4c82ca3756a2a
  • master default protected
2 results

dyndns.html

Blame
  • 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 %}