Mobile app version of vmapp.org
Login or Join
Speyer207

: I registered a domain name — how can I point it to my DynDNS host? How can I host a website from my home machine? I have a DynDNS address so that even if my external IP changes, the

@Speyer207

Posted in: #Dns #Domains

How can I host a website from my home machine? I have a DynDNS address so that even if my external IP changes, the machine is accessible.

Lets say, for example, the machine is accessible at example.dyndns-home.com (this is a free service from DynDNS). I've registered a domain name for my website from GoDaddy. Let's say that domain name is example.com

Right now, I've forwarded port 80 so I can enter example.dyndns-home.com from anywhere and I can see whatever I've hosted at my homebox.

How can I make it so that, when I enter example.com, I see the same thing? I want to see what I host on my home machine out on the internet via example.com.

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer207

4 Comments

Sorted by latest first Latest Oldest Best

 

@Becky754

Register/move your domain to a registrar that supports Dynamic DNS functionality. Namecheap.com is one such registrar. Instructions are in their knowledgebase. Note that you can enable dynamic DNS for a subdomain by creating a subdomain entry of type 'A+ Dynamic DNS'.

The default config for ddclient package (on Arch Linux, at least) includes the settings for this registrar's protocol:

##
## NameCheap (namecheap.com)
##
protocol=namecheap,
server=dynamicdns.park-your-domain.com,
login=YOUR-TOP-LEVEL-DOMAIN,
password=HEX-PASSWORD-FROM-DASHBOARD
YOUR-DYNAMIC-SUBDOMAIN.YOUR-TOP-LEVEL-DOMAIN

10% popularity Vote Up Vote Down


 

@Kevin317

Assuming you have a server running Linux, and you are looking to update a DNS A record with the IP of your home server on DNS hosted by GoDaddy, you could do the following on the home server. Note that it my violate your EULA. Be sure that you follow the rules!


Install Python2.7 (it is likely already installed).
Place the following file at /config/scripts/godaddy_ddns.py. It is the part that does the actual work of updating godaddy using the pygodaddy library. It will update all domains associated with your godaddy account. It will set an A record for the '@' subdomain wildcard. You can edit this, if you want to specify alternate subdomains. You must also replace '@USERNAME@' with your godaddy username and '@PASSWORD@' with your godaddy password.

#!/usr/bin/env python

import logging
import pif
import pygodaddy

# Original Source:
# saschpe.wordpress.com/2013/11/12/godaddy-dyndns-for-the-poor/ # github.com/observerss/pygodaddy #
# Modified by Jeremy Sears (https://stackoverflow.com/users/1240482/jsears)


logging.basicConfig(filename='godaddy.log', format='%(asctime)s %(message)s', level=logging.INFO)
# the "requests" library logs noisily, so turn that off
logging.getLogger("requests").setLevel(logging.WARNING)

logging.debug("DEBUG: Running godaddy_ddns.py");

U="@USERNAME@"
P="@PASSWORD@"
client = pygodaddy.GoDaddyClient()
success = client.login(U,P)
if success:
logging.debug("DEBUG: Successfully logged in.")
else:
logging.error("ERROR: Failed to log in to godaddy.com with username: '{0}'.".format(U))

for domain in client.find_domains():
logging.debug("DEBUG: Looking up DNS Records for {0}.".format(domain))
dns_records = client.find_dns_records(domain)
public_ip = pif.get_public_ip()
logging.debug("DEBUG: Domain '{0}' DNS records: {1}".format(domain, dns_records))
logging.debug("DEBUG: Current Public IP '{0}'.".format(public_ip))
if len(dns_records) == 0:
logging.debug("DEBUG: No existing DNS records found.")
else:
logging.debug("DEBUG: Existing IP in DNS is '{0}'.".format(dns_records[0].value))

if len(dns_records) == 0 or public_ip != dns_records[0].value:
logging.debug("DEBUG: Updating A record for domain '{0}'.".format(domain))
success = client.update_dns_record("@."+domain, public_ip)
if success:
logging.info("INFO: Domain '{0}': Successfully set public IP to '{1}'.".format(domain, public_ip))
else:
logging.error("ERROR: Domain '{0}': Unable to update public IP to '{1}'.".format(domain, public_ip))
else:
logging.info("INFO: Public IP A record DNS record for domain '{0}' is up to date, and does not need to be updated.".format(domain))

Run sudo chown root /config/scripts/godaddy_ddns.py
Run sudo chmod u+x /config/scripts/godaddy_ddns.py
Place the following file at /config/scripts/godaddy_ddns.sh. This is a wrapper script that sets up a virtualenv to isolate the libraries used by the python script. It then invokes the above python script.

#!/bin/sh

# Original Source:
# saschpe.wordpress.com/2013/11/12/godaddy-dyndns-for-the-poor/ # github.com/observerss/pygodaddy #
# Modified by Jeremy Sears (https://stackoverflow.com/users/1240482/jsears)

OLD_PWD=$PWD
ROOT_DIR=$(dirname [CO])
if [ -n "" ] ; then
WORKING_DIR=
else
WORKING_DIR=$ROOT_DIR
fi
mkdir -p $WORKING_DIR
cd $WORKING_DIR
if [ ! -d .venv27 ] ; then
curl -O pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.tar.gz tar xvfz virtualenv-1.9.tar.gz
python virtualenv-1.9/virtualenv.py .venv27
fi
source .venv27/bin/activate
pip install -q --upgrade pif pygodaddy
$ROOT_DIR/godaddy_ddns.py
deactivate
cd $OLD_PWD

Run sudo chown root /config/scripts/godaddy_ddns.sh
Run sudo chmod u+x /config/scripts/godaddy_ddns.sh
Place the following file at /etc/cron.hourly/run_godaddy_ddns (no file extension). This will call the godaddy_ddns.sh script each hour.

#!/bin/sh

WORKING_DIR=/var/local/godaddy_ddns
exec /config/scripts/godaddy_ddns.sh $WORKING_DIR
exit 0

Run sudo chown root /etc/cron.hourly/run_godaddy_ddns
Run sudo chmod u+x /etc/cron.hourly/run_godaddy_ddns
Logs will be written to godaddy.log in the /var/local/godaddy_ddns directory. This directory can be changed by editing the run_godaddy_ddns script.
Place the following file at /etc/logrotate.d/godaddy_ddns (no file extension). This will ensure that your log file doesn't fill up your disk, by rotating the log file. If you changed the logging location, you will need to edit the log file location.

/var/local/godaddy_ddns/godaddy.log {
weekly
missingok
rotate 12
compress
delaycompress
notifempty
copytruncate
maxage 365
}

You will also need to add a CNAME record in the GoDaddy domain manager to point 'www' to '@'


Security Note: You probably should edit the run_godaddy_ddns script and su to a user other than root, so that the script is run with more limited permissions.

10% popularity Vote Up Vote Down


 

@Deb1703797

Finally i know What is the problem ?
For me My ISP block port 80 and 8080
So i configure My Website to work with another port For Example :
exapmle.dyndnsorg:5060

1- I register for 14 Trial Days in Dyn Standard Dns

2- I configure my domain with the DNS from dyndns

xxxx.dns.dyn.com
xxxx.dns.dyn.com
xxxx.dns.dyn.com
xxxx.dns.dyn.com


3- I create anew WebHop to forward my Domain To My DynDns Domain
For Example

Host-name : example.com

Service : WebHop

Details : example.dyndns.org:5060

10% popularity Vote Up Vote Down


 

@Kevin317

Add a cname record to the DNS record for your domain, pointing from example.com to example.dyndns-home.com. I've only ever used one domain registrar (not Godaddy), but they have a neat web interface where you can update the DNS record.

Raw example:
example.com. 43200
IN
CNAME
example.dyndns-home.com.


Working example is provided, at least using Google's nameservers.

Edit (twice):

If you wanted example.com to work too, you must add a second entry from example.com to example.dyndns-home.com. This might be done by forwarding @ .example.com, I don't know if that's standard or not.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme