content:serverbasics:network-dyndns
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| content:serverbasics:network-dyndns [2025/02/08 12:51] – [Check the Connection] obel1x | content:serverbasics:network-dyndns [2025/07/10 20:39] (aktuell) – obel1x | ||
|---|---|---|---|
| Zeile 36: | Zeile 36: | ||
| </ | </ | ||
| + | How the rebind protection work: DNS queries to your Router won't return the IP of the service. So if you experience, that '' | ||
| ===== Modem Setup ===== | ===== Modem Setup ===== | ||
| Zeile 66: | Zeile 67: | ||
| After that, check if your device has an temporary adress with '' | After that, check if your device has an temporary adress with '' | ||
| - | *** Not finished - i have not found any docs at ddclient, how to get the interface temporary adress working, made up https:// | + | *** Not finished - i have not found any docs at ddclient, how to get the interface temporary adress working, made up [[https:// |
| - | + | ||
| - | For the time beeing, i will be fine using the non- private adress. | + | |
| - | + | ||
| ===== DynDNS Provider ===== | ===== DynDNS Provider ===== | ||
| Zeile 77: | Zeile 74: | ||
| The opposite of those free registries is, that you can only use a subdomain of the Top-Level domain they offer, which makes your Domain Name fixed at the end. For me personally, i have bought a domain on my own in the tld of my country (costs about 15 Euro in one Year), which i can now use. | The opposite of those free registries is, that you can only use a subdomain of the Top-Level domain they offer, which makes your Domain Name fixed at the end. For me personally, i have bought a domain on my own in the tld of my country (costs about 15 Euro in one Year), which i can now use. | ||
| + | ===== Register Subdomains ===== | ||
| + | |||
| + | After you logged into your DynDNS Provider, enable dynDNS for your IPs and add subdomains - each one for one service. If you want to acces your Portainer you created when setting up docker, e.g. use a Subdomain called | ||
| + | |||
| + | portainer.domain.tld | ||
| + | |||
| + | Make sure, that DynDNS is selected for that record again! | ||
| ===== DDclient ===== | ===== DDclient ===== | ||
| Zeile 82: | Zeile 86: | ||
| The Task to update the dyndns- entry to point to the right host can be done best on the host itself as explained before. The Host may detect interface- changes of the Adress and will push out automagically using some client. | The Task to update the dyndns- entry to point to the right host can be done best on the host itself as explained before. The Host may detect interface- changes of the Adress and will push out automagically using some client. | ||
| - | DDClient can be used in the local server/host to assign some DNS- Record to an IP. It turned out, that the **DDclient V3.8.3 of OpenSuSE Leap 15.5** was not able to work with IPv6 in the Version coming from the main Repositories. | + | Hint for old SuSE: DDClient can be used in the local server/host to assign some DNS- Record to an IP. It turned out, that the **DDclient V3.8.3 of OpenSuSE Leap 15.5** was not able to work with IPv6 in the Version coming from the main Repositories. So add the Repository '' |
| - | Add the Repository '' | + | After upgrading |
| - | The config is in ''/ | + | The config is in ''/ |
| < | < | ||
| - | #01.01.2023 dnydns test | + | # Globals |
| - | ssl=yes, | + | daemon=300 |
| + | ssl=yes | ||
| + | syslog=yes | ||
| + | mail-failure=root | ||
| + | |||
| + | # IP-Specific | ||
| usev6=ifv6, | usev6=ifv6, | ||
| - | if=wlan0, | + | if=eth0, |
| protocol=dyndns2, | protocol=dyndns2, | ||
| - | server=dynv6.com, | + | server=dyndns.strato.com/nic/update, |
| - | login=none, password=' | + | login=' |
| - | domainname.dynv6.net,cname.domainname.dynv6.net | + | nextcloud.domain.tld,ipa.domain.tld |
| + | |||
| + | # If you want ipv4 too you may use: | ||
| + | usev4=cmdv4, | ||
| + | protocol=dyndns2, | ||
| + | server=dyndns.strato.com/ | ||
| + | login=' | ||
| + | password=' | ||
| + | nextcloud.domain.tld, | ||
| </ | </ | ||
| Zeile 105: | Zeile 122: | ||
| * DDClients Config is a bit strange to understand. My example is **one server **in the view of ddclient, which is why there are commas seperating the options for that host. | * DDClients Config is a bit strange to understand. My example is **one server **in the view of ddclient, which is why there are commas seperating the options for that host. | ||
| * You can also specify each option without comma, but then the setting will change the **defaults** | * You can also specify each option without comma, but then the setting will change the **defaults** | ||
| + | |||
| + | After that, you may use a script for determining the right ipv4- adress. This is while NAT of IPV4 needs the adress of your router and not you servers adress. | ||
| + | |||
| + | One Example would be this file / | ||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | |||
| + | curl -s4 http:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | Or - if you are using Fritzbox, then you may use phyton: | ||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | FULLSTR=$(/ | ||
| + | SEARCH='" | ||
| + | S2='",' | ||
| + | P1=${FULLSTR# | ||
| + | P2=${P1%%$S2*} | ||
| + | IPADDR=${P2: | ||
| + | echo -n ${IPADDR} | ||
| + | |||
| + | </ | ||
| + | |||
| + | And File / | ||
| + | |||
| + | < | ||
| + | # | ||
| + | # -*- coding: utf-8 -*- | ||
| + | |||
| + | # Quelle: https:// | ||
| + | # Vorbereitung: | ||
| + | # - Paket python3-xmltodict installieren | ||
| + | # - Benutzer, Passwort | ||
| + | |||
| + | import requests, xmltodict, json, re | ||
| + | from requests.auth import HTTPDigestAuth | ||
| + | |||
| + | def main(): | ||
| + | # define your IP and credentials in you fritzbox first | ||
| + | username = " | ||
| + | password = " | ||
| + | |||
| + | # what we want to access | ||
| + | req_endpoint = '/ | ||
| + | service = ' | ||
| + | action = ' | ||
| + | |||
| + | # form-autofill for python users | ||
| + | soapaction = service + '#' | ||
| + | raw_envelope = re.sub(r" | ||
| + | """<? | ||
| + | |||
| + | # send the authenticated soap request | ||
| + | auth = HTTPDigestAuth(username, | ||
| + | device = " | ||
| + | headers = {' | ||
| + | envelope = raw_envelope.format(service=service, | ||
| + | encoded = envelope.encode(" | ||
| + | boxdata = requests.post(url=device, | ||
| + | |||
| + | # XML to dict, remove outer nesting, pretty print JSON | ||
| + | data_dict = xmltodict.parse(boxdata) | ||
| + | response_tag = ' | ||
| + | data_dict = data_dict[' | ||
| + | json_data = json.dumps(data_dict, | ||
| + | print(json_data) | ||
| + | |||
| + | main() | ||
| + | |||
| + | </ | ||
| ==== Debugging ==== | ==== Debugging ==== | ||
content/serverbasics/network-dyndns.1739015476.txt.gz · Zuletzt geändert: von obel1x
