How to give computer URL to access over the internet?

2

3

I would like to be able to SSH into my macs over the internet using a DNS name like my-imac@example.com or something similar instead of having to enter an IP address every time. How can I assign domain names to my computers so I don't have to use the IP address to access them anymore? Any insight would be appreciated!

agentbanks217

Posted 2012-06-21T20:53:10.923

Reputation: 305

Answers

9

You need to go a domain registar, and register a domain name with them. You then create an A record to point to your IP address with whomever is hosing the DNS servers that are hosting your domain (this may or may not be your registar) - after that, simply use the domain name in place of wherever you'd use the IP address.

Some websites, like DynDNS, do half the work for you. They have already registered a domain and set up the DNS servers, and then hand out subdomains. You can't get example.org with them, but you can get example.dyndns.org to point to your IP address for free (the other way costs about $10/year depending on the type of domain name you go with). All you have to do is sign up at the website and pick a subdomain name and enter your IP to get started :)

Darth Android

Posted 2012-06-21T20:53:10.923

Reputation: 35 133

what about if your IP is dynamic? – user4951 – 2013-06-08T16:33:52.783

2

You need to install an Update Client.

– Karan – 2013-06-08T23:03:14.750

8

You could sign up for DynDns: http://dyn.com/dns/

That's how I've done ssh to my machine in the past. I believe they have a free version that allows you to have at least one domain name.

It's particularly nice because of the features they add such as the "Internet Guide" which allows for some content restriction control.

Ci3

Posted 2012-06-21T20:53:10.923

Reputation: 291

1They have a free version that allow you to register up to 2 machines. That's what I use. – fmanco – 2012-06-21T21:00:05.297

@criziot: Oh good! That's even better. – Ci3 – 2012-06-21T21:02:14.297

5

If you have a static IP, you can assign an alias for your ip in the /etc/hosts file:

127.0.0.1 localhost
xx.xx.xx.xx alias.whatever

If you have a dynamic IP, you could use the service by sites like http://www.no-ip.com/ to get a subdomain.

solarc

Posted 2012-06-21T20:53:10.923

Reputation: 475

+1 I do this all the time... and in windows, hosts is under system32/drivers/etc/. I don't bother with a . in the alias. So I always have work as "work". Some more goodies to look in to are .ssh/config, where you can include the IP address in a host entry, along with target username and/or use a specific key. – Chris K – 2012-06-21T22:31:04.093

-1

Assuming you mean over the internet, I would use godaddy.com if you have a static IP address. Static IP address means your IP does not change over time.

If you have a dynamic IP address I would buy your domain through godaddy.com then point the Nameservers to dnsexit.com. They allow you to use all the free dynamic domains you want.

alexander7567

Posted 2012-06-21T20:53:10.923

Reputation: 293

Static IPs from "home" connections are very-super-rare. So, any solution based on static IP is doomed to failure. – killermist – 2012-06-22T05:50:37.203

I have a static ip at home. It wasn't even a chosen option. I have had pretty much the same ip since the 2 years I've had this service. – alexander7567 – 2012-06-22T13:20:55.797