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 [2024/04/20 19:17] – [Security/privacy Extensions] 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:// | ||
| ===== DynDNS Provider ===== | ===== DynDNS Provider ===== | ||
| - | Next Step to choose is a provider for dyndns. There are many dyndns- providers out there. | + | Next Step to choose is a provider for dyndns. There are many dyndns- providers out there - even free of charge. E.g. [[https:// |
| + | |||
| + | 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 75: | 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 98: | 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 ==== | ||
| Zeile 113: | Zeile 210: | ||
| ==== Check the Connection ==== | ==== Check the Connection ==== | ||
| - | you may now have the IPv6 of your Device published at some adress and check this by: | + | you may now have the IPv6 of your Device published at some adress and check this by digging at googles DNS for that IPV6: |
| < | < | ||
| - | pcserver2023: | + | pcserver2023: |
| - | Server: 192.168.2.1 | + | |
| - | Address: 192.168.2.1#53 | + | ; <<>> |
| + | ; (1 server found) | ||
| + | ;; global options: +cmd | ||
| + | ;; Got answer: | ||
| + | ;; ->> | ||
| + | ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 | ||
| + | |||
| + | ;; OPT PSEUDOSECTION: | ||
| + | ; EDNS: version: 0, flags:; udp: 512 | ||
| + | ;; QUESTION SECTION: | ||
| + | ;ipa.obel1x.de. IN AAAA | ||
| + | |||
| + | ;; ANSWER SECTION: | ||
| + | ipa.obel1x.de. | ||
| - | Non-authoritative answer: | + | ;; Query time: 44 msec |
| - | Name: obel1x.dynv6.net | + | ;; SERVER: 8.8.8.8# |
| - | Address: 2003:c4:bf3c: | + | ;; WHEN: Sat Feb 08 12:49:12 CET 2025 |
| + | ;; MSG SIZE rcvd: 70 | ||
| </ | </ | ||
content/serverbasics/network-dyndns.1713633423.txt.gz · Zuletzt geändert: von obel1x
