|
@@ -509,6 +509,48 @@ Via your router's firewall settings you should now open port 22 (secure shell).
|
509
|
509
|
|
510
|
510
|
The freeDNS subdomain which you just created will hereafter just be refered to as "/your domain name/".
|
511
|
511
|
|
|
512
|
+If you have multiple freedns subdomains then you may want to rationalise that a little within */etc/crontab*. Rather than listing them all individually create a script:
|
|
513
|
+
|
|
514
|
+#+BEGIN_SRC: bash
|
|
515
|
+emacs /usr/bin/dynamicdns
|
|
516
|
+#+END_SRC
|
|
517
|
+
|
|
518
|
+Add however many freedns subdomains you have.
|
|
519
|
+
|
|
520
|
+#+BEGIN_SRC: bash
|
|
521
|
+#!/bin/bash
|
|
522
|
+# subdomain name 1
|
|
523
|
+wget -O - http://freedns.afraid.org/dynamic/update.php?<subdomain code 1>== >> /dev/null 2>&1
|
|
524
|
+# subdomain name 2
|
|
525
|
+wget -O - http://freedns.afraid.org/dynamic/update.php?<subdomain code 2>== >> /dev/null 2>&1
|
|
526
|
+...
|
|
527
|
+#+END_SRC
|
|
528
|
+
|
|
529
|
+Save and exit, then make the script runnable and only readable by the root user.
|
|
530
|
+
|
|
531
|
+#+BEGIN_SRC: bash
|
|
532
|
+chmod 400 /usr/bin/dynamicdns
|
|
533
|
+chmod +x /usr/bin/dynamicdns
|
|
534
|
+#+END_SRC
|
|
535
|
+
|
|
536
|
+Then within */etc/crontab*
|
|
537
|
+
|
|
538
|
+#+BEGIN_SRC: bash
|
|
539
|
+emacs /etc/crontab
|
|
540
|
+#+END_SRC
|
|
541
|
+
|
|
542
|
+You can replace the multiple freedns entries with a single line:
|
|
543
|
+
|
|
544
|
+#+BEGIN_SRC: bash
|
|
545
|
+*/10 * * * * root /usr/bin/timeout 60 /usr/bin/dynamicdns
|
|
546
|
+#+END_SRC
|
|
547
|
+
|
|
548
|
+Then save and exit and restart the cron daemon.
|
|
549
|
+
|
|
550
|
+#+BEGIN_SRC: bash
|
|
551
|
+service cron restart
|
|
552
|
+#+END_SRC
|
|
553
|
+
|
512
|
554
|
** Set the host name
|
513
|
555
|
|
514
|
556
|
#+BEGIN_SRC: bash
|