Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #194439

Re: changing local domain name

From Dan Purgert <dan@djph.net>
Newsgroups linux.debian.user
Subject Re: changing local domain name
Date 2018-04-03 13:30 +0200
Message-ID <vAsiu-7cm-13@gated-at.bofh.it> (permalink)
References (3 earlier) <vyREl-Db-3@gated-at.bofh.it> <vz6WJ-25j-1@gated-at.bofh.it> <vzehz-7eR-1@gated-at.bofh.it> <vzn1w-4Bp-3@gated-at.bofh.it> <vzqsq-6SD-3@gated-at.bofh.it>
Organization A noiseless patient Spider

Show all headers | View raw


David Wright wrote:
>> If you lease a public domain name, there is no real
>> difficulty about using it also in a private network, just a matter of
>> making sure that external resources using the name can also be found in
>> local DNS or hosts files.
>
> If you could elaborate. Say I have leased example.org, currently at
> 93.184.216.34, and apart from what's out there on the Internet I have
> hosts foo.example.org at 192.168.1.2 and bar.example.org at 192.168.1.3
> with a router at 192.168.1.1. What do I need to do? For simplicity, I
> use dhcp from the router which also has no DNS server. So /etc/hosts.

Assuming that you want to connect to "foo.example.org" from somewhere
else on the internet, you use DNS to do the "foo.example.org =
93.184.216.34" translation (if 93.x is static, your registrar's DNS
servers are fine.  If it's not, a dynamic service like no-ip.com,
afraid.org, or similar).  Then you use DNAT on your router to do the
translation for "93.184.216.34, port 80 => 192.168.1.2, port 80"

Now, you'll run into problems since DNAT can only use one target IP
address / port combination to forward (so, hosts foo and bar CANNOT both
be forwarded to by triggering the router on destination port 80).

On the other hand, if you're only concerned about hosts INSIDE your
network (and don't necessarily need them accessible from the public
internet), you have two options:

  1. Manually set /etc/hosts entries on your devices. OR
  2. Run your own DNS server (bind, unbound, others).

The first option is simpler, but a real pain in the neck after a dozen
hosts or so.  It also will likely fall over if some of your hosts are
phones / tablets (although, I've never really bothered looking into the
tools for them).

The second option is more involved, but it's also not terribly hard (I
mean, I set it up in a weekend between reading the manpages, and some
tutorials).  However, spending a weekend or three setting it up means
you never have to go through *that* particular headache again -- you
just point all your hosts at it (of course, don't forget to make your
backups!).

-- 
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

changing local domain name mick crane <mick.crane@gmail.com> - 2018-03-29 19:10 +0200
  Re: changing local domain name Curt <curty@free.fr> - 2018-03-29 20:40 +0200
    Re: changing local domain name mick crane <mick.crane@gmail.com> - 2018-03-29 22:00 +0200
      Re: changing local domain name john doe <johndoe65534@mail.com> - 2018-03-30 08:10 +0200
        Re: changing local domain name David Wright <deblis@lionunicorn.co.uk> - 2018-03-30 18:20 +0200
          Re: changing local domain name john doe <johndoe65534@mail.com> - 2018-04-03 08:40 +0200
            Re: changing local domain name David Wright <deblis@lionunicorn.co.uk> - 2018-04-12 22:30 +0200
              Re: changing local domain name john doe <johndoe65534@mail.com> - 2018-04-13 13:30 +0200
                Re: changing local domain name Dan Purgert <dan@djph.net> - 2018-04-13 14:30 +0200
                Re: changing local domain name rhkramer@gmail.com - 2018-04-13 14:50 +0200
                Re: changing local domain name Dan Purgert <dan@djph.net> - 2018-04-13 15:10 +0200
                Re: changing local domain name David Wright <deblis@lionunicorn.co.uk> - 2018-04-13 16:10 +0200
    Re: changing local domain name Brian <ad44@cityscape.co.uk> - 2018-03-30 00:10 +0200
      Re: changing local domain name David Wright <deblis@lionunicorn.co.uk> - 2018-03-30 04:10 +0200
        Re: changing local domain name Curt <curty@free.fr> - 2018-03-30 10:40 +0200
          Re: changing local domain name Brian <ad44@cityscape.co.uk> - 2018-03-30 15:10 +0200
        Re: changing local domain name Brian <ad44@cityscape.co.uk> - 2018-03-30 20:30 +0200
          Re: changing local domain name David Wright <deblis@lionunicorn.co.uk> - 2018-03-31 04:20 +0200
            Re: changing local domain name Joe <joe@jretrading.com> - 2018-03-31 13:40 +0200
              Re: changing local domain name David Wright <deblis@lionunicorn.co.uk> - 2018-03-31 17:20 +0200
                Re: changing local domain name Gene Heskett <gheskett@shentel.net> - 2018-03-31 17:30 +0200
                Re: changing local domain name Joe <joe@jretrading.com> - 2018-03-31 20:50 +0200
                Re: changing local domain name David Wright <deblis@lionunicorn.co.uk> - 2018-04-03 00:10 +0200
                Re: changing local domain name Dan Purgert <dan@djph.net> - 2018-04-03 13:30 +0200

csiph-web