This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
tutorials:mdns-tutorial [2011/04/30 14:42] – created clemens | tutorials:mdns-tutorial [2012/01/15 22:31] – Relocate sdf-eu=zdns note to the top of the page memnon | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== WAN IP Retrieval and Dynamic DNS (mdns) ==== | ==== WAN IP Retrieval and Dynamic DNS (mdns) ==== | ||
+ | **Note** that on **SDF-EU**, the command to set the dynamic address is [[faq: | ||
There are a myriad of ways to automatically keep your **mdns** updated on SDF. Below are a couple: | There are a myriad of ways to automatically keep your **mdns** updated on SDF. Below are a couple: | ||
Line 30: | Line 31: | ||
#!/bin/ksh | #!/bin/ksh | ||
- | ssh me@remote.host ' | + | ssh me@remote.host ' |
</ | </ | ||
Line 38: | Line 39: | ||
<code bash> | <code bash> | ||
#!/bin/ksh | #!/bin/ksh | ||
- | ssh me@remote.host ' | + | ssh me@remote.host ' |
</ | </ | ||
Line 68: | Line 69: | ||
"wget http:// | "wget http:// | ||
- | where you set appropriate paths and replace the keyword according to your choice (it is currently set to ' | + | where you set appropriate paths and replace the keyword according to your choice (it is currently set to ' |
If everything is ok, the script will respond with the output of the mdns command; otherwise, it will simply echo your query. All calls are logged, including the IP of the calling host and the submitted query string. The script keeps track of the IP and runs the mdns command only if the IP has changed since the last call. | If everything is ok, the script will respond with the output of the mdns command; otherwise, it will simply echo your query. All calls are logged, including the IP of the calling host and the submitted query string. The script keeps track of the IP and runs the mdns command only if the IP has changed since the last call. | ||
Line 89: | Line 90: | ||
HOME=`finger $LOGNAME|awk '/ | HOME=`finger $LOGNAME|awk '/ | ||
export LOGNAME HOME | export LOGNAME HOME | ||
- | echo "`date -u +%c` | + | echo "`date -u +%c` |
chmod 600 $LOGF | chmod 600 $LOGF | ||
- | cat <& | + | cat <& |
if [ -d " | if [ -d " | ||
if [ " | if [ " | ||
Line 97: | Line 98: | ||
else | else | ||
| | ||
- | echo $REMOTE_ADDR | + | echo $REMOTE_ADDR |
fi | fi | ||
else echo "no $DNSCOM due to bad HOME=$HOME" | else echo "no $DNSCOM due to bad HOME=$HOME" | ||
Line 105: | Line 106: | ||
fi | fi | ||
</ | </ | ||
+ |