# Just bought a domain. Looking to self-host. Need DNS help!

## FcukThisGame

I just bought <myrealname>.org through GoDaddy and I want to set up my own web/ftp/mail/etc server through that domain. I currently have a free subdomain through DynDNS (<name>.doesntexist.com). 

I don't have a static external IP so I think I'll still need DynDNS. What I really don't understand is how to tell GoDaddy how to look to my IP for that domain. 

My gentoo box is running (among many other things) dnsmasq. I've changed the domain there, but I don't have it all working yet. 

Can somebody point me in the right direction?

Thanks

----------

## eccerr0r

Well, for a domain name you really can't do anything with it unless you have static IP.

The only thing I can think of is put in a CNAME record for GoDaddy to your dynamic DNS name.  No configuration on your server, totally through GoDaddy's "Total DNS Control" webpage.  GoDaddy does not have dynamic DNS service as far as I can tell even if you bought a name from them.

If you had static IP, you could tell GoDaddy to NS to your machine, but I ended up just using GoDaddy's DNS server and just letting them point to my machine.  As a test I do have a NS'ed subdomain that's serviced by my machine, but since I have static IP, it's not an issue.

Running a BIND/DNS server on a dynamic IP doesn't work too well.

Since you have DynDNS you should have asked DynDNS to register a name, they might even have a dynamic DNS service for those too?  I'm not sure...

----------

## Ant P.

There's also afraid.org as an alternative to dyndns, and from what I gather their <name>.com dynamic DNS is free, unlike dyndns's.

----------

## FcukThisGame

I've read that the dynamic external IPs sometimes don't get changed for 6+ months at a time. I gave GoDaddy my external IP and it looks like everything's working!

----------

## eccerr0r

 *FcukThisGame wrote:*   

> I've read that the dynamic external IPs sometimes don't get changed for 6+ months at a time. I gave GoDaddy my external IP and it looks like everything's working!

 

Depends on your internet provider, I've seen Comcast not change IPs for a while as long as you maintain a lease but it's always subject to change, and when it does, trouble ahead.

But either way you shouldn't bother running externally accessible DNS on a dynamic IP.

I'm not sure it's possible but if you delete the A record for "@" and put a "@" in the CNAME that points to <name>.doesntexist.com then whenever you change your DynDNS account, then whenever you use your GD name it will use the DynDNS name.

One thing that should work is CNAMEing www.<myrealname>.org to <name>.doesntexist.com, I'm just not sure if the top level record can be CNAMEd.  Not sure I want to try it on my account because it's working the way I want now  :Very Happy: 

----------

## XQYZ

Also be aware of the fact that almost all major mail providers will reject mails send from dynamic ips due to spam suspicion.

----------

## FcukThisGame

 *XQYZ wrote:*   

> Also be aware of the fact that almost all major mail providers will reject mails send from dynamic ips due to spam suspicion.

 

Yeah, if I do decide to run a mail server I'll have to shell out the cash for a static IP. 

I got the DNS on GoDaddy pointing to my external IP and I had everything working, but I went to create a subdomain (per this guide) and now when i go to <myrealname>.org it gives me nothing and shows my external IP in the browser bar. Does anybody know what happened?

----------

## FcukThisGame

Also, when I run 'domainname' it returns (none). I've set it in my /etc/conf.d/net, my /etc/hosts, and /etc/conf.d/domainname. WTF?\

EDIT: I set /etc/conf.d/domainname properly and my uname -a gives me the proper hostname.domainname combination. Running 'domainname' still gives me "(none)" but I think that part is fixed.

Current issues: Subdomains are not working. IP shows in address bar instead of domain name when you view the webpage.

----------

## FcukThisGame

I think it's got something to do with my vhosts. /etc/apache2/vhosts.d/00_default_vhost.conf. I've removed all references to the vhosts.include file for simplicity. Everything vhost related is in this file:

```
<IfDefine DEFAULT_VHOST>

Listen 80

NameVirtualHost *:80

<VirtualHost *:80>

        ServerName <myrealname>.org

        ServerAlias *.<myrealname>.org

        ServerAdmin <myemailaddress> 

        DocumentRoot "/var/www/<myrealname>.org/"

      <Directory "/var/www/<myrealname>.org/">

                Options Indexes FollowSymLinks

                AllowOverride All

                Order allow,deny

                Allow from all

        </Directory>

</VirtualHost>

<VirtualHost *:80>

   ServerName torrents.<myrealname>.org

   ServerAlias torrents.<myrealname>.org

   ServerAdmin <myemailaddress>

   DocumentRoot "/var/www/<myrealname>.org/torrents"

   <Directory "/var/www/<myrealname>.org/torrents">

      Options Indexes FollowSymLinks

      AllowOverride All

      Order allow,deny

      Allow from all

   </Directory>

</VirtualHost>

<VirtualHost *:80>

   ServerName camera.<myrealname>.org

   ServerAlias camera.<myrealname>.org

   ServerAdmin <myemailaddress>

   DocumentRoot "/var/www/<myrealname>.org/camera"

    <Directory "/var/www/<myrealname>.org/camera">

       Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny

        Allow from all

   </Directory>

</VirtualHost>

</IfDefine>

```

----------

## titanofold

I use ZoneEdit as my registrar and such. (Side note: I should have done something to maintain my five free zones instead of the two they give for free now.) I have a regular, residential ADSL, which means I have a dynamic global IP. 

On my server I have ddclient maintaining the zone. ddclient logs into my ZoneEdit account and updates the IP address for the various sub-domains and MX record. The only real problem that crops up every now and then is how long it takes for the name servers, not necessarily ZoneEdit's name servers, to refresh their information. The updated IP address may be propagated in a few minutes or a few days all depending on when the IP address is updated, when the various name servers refresh their data, and how many name servers need to refresh their data before it gets to your name server.

Some ISPs have certain restrictions in place. Port 80 is not an option for me on the Verizon/Frontier network, unless I pay more for a different package. Additionally, I cannot send email directly from my server, which again is a restriction of the ISP. When I was with Comcast, again with a dynamic IP, I had no problems sending emails -- contrary to XQYZ -- directly to GMail, Charter or Yahoo!. Your mileage may vary. Typically, ISPs that are notorious for hosting spammers are blocked, rather than dynamic IPs being blocked altogether. Even then, they may not be blocked outright as much as they might just be marked as spam immediately.

There are alternatives. I have ZoneEdit setup to redirect requests to port 81 instead of port 80, and Postfix is setup to relay emails via Verizon's SMTP server. Not too tricky, is permitted...so far, and everyone still sees the email as coming from my domain without it being marked as spam. And I receive replies just fine.

So, a lot can be done with a dynamic IP -- contrary to eccerr0r. Whether you have to jump through hoops is another question. With Comcast, the Internet was my oyster. Not so much with Verizon, but I can still host all the services I had before...just not as directly for email and HTTP(S).

----------

## eccerr0r

 *titanofold wrote:*   

> So, a lot can be done with a dynamic IP -- contrary to eccerr0r. Whether you have to jump through hoops is another question. With Comcast, the Internet was my oyster. Not so much with Verizon, but I can still host all the services I had before...just not as directly for email and HTTP(S).

 

I think it's already been covered.  There are key DNS things that can't be done on dynamic IP and things that cause lots of frustration on it too:

You cannot make your own public DNS server on dynamic DNS.  Public root DNS servers will not allow people to point to dynamic DNS servers.  Note I say public root DNS servers, if you want to make your own root and point your own machines to your own root, that's a different story, but nobody else can see your changes (to make it clear, why you want to do this: subdomain delegation/personal zone control).

Even if you could have resolvers point to your dynamic IP DNS, unless you use secure DNS you cannot be sure you're using the right server, but this once again is the same issue for any service on dynamic IP.

And again as someone stated, many ISPs will block email from your dynamic IP SMTP server.  I found this out the hard way, I was wondering why my dynamic IP mail server was losing mails being sent to certain people; it was because their isps were marking my mail as spam, and there's nothing that can be done - it's the policy of the remote server unless you want to go speak to every individual company(good luck!).  Once I got static, custom reverseable IP address, the problem went away.

If all you want is to be able to ssh to your box or perhaps use it for your own private Ventrillo server, then that's great, it can save some figuring out your IP address.

----------

