1

I have 100/100 mbit link with static public ip configured on interface on Cisco router. On lan side I have domain controller with dns server and computers.

How can I make that computers go outside as domain.com instead of ip address / how to set hostname to domain name.

For example: when I visit serverfault.com I want that my visit is logged as domain.com not visit from xxx.xxx.xxx.xxx

Carlo
  • 125
  • 2
  • 10

4 Answers4

5

In order to be seen as a DNS name instead of IP address (if the system logging your connection is doing reverse lookups) you need a Pointer record PTR that maps your IP to a hostname (also called reverse DNS).

It depends on your ISP and your internet connection contract whether you are allowed to request for PTR record changes for your public IP, as the PTR records are managed by the registered owner of the IP block. You can do a lookup on ARIN WHOIS IP Address Database to see the actual owner.

If your ISP allows you to request for a custom reverse name (instead of their own or blank), you also need corresponding A record in the DNS of your domain, i.e.

example.com.                8850 IN     A       93.184.216.34
34.216.184.93.in-addr.arpa. 3600 IN     PTR     example.com.

Having both PTR and A mapped is probably not necessary unless you are maintaining an own mail (SMTP) server: the only reasonable requirement for working reverse DNS is that reverse DNS should match SMTP banner (the name that your SMTP server uses for introducing itself):

Some receiving mail servers may use this as an indication of a possible spam source in a scoring system. Most will not reject incoming mail solely on this basis. We recommend that you contact your ISP and ask them to setup a reverse record (PTR) that matches the hostname of your mail server.

Even in this case a suitable workaround is to change the SMTP banner to match the reverse DNS: you always have control on your SMTP banner even when you can't control the PTR record.

The logs on remote server are not good for advertisement as only technical persons ever sees them. Conversely, having your company domain pointing at your on-premises instead of a public server and exhibiting that this is the public IP of your office may lure some denial of service attempts. Therefore most organizations would want to avoid having custom PTR records.

Esa Jokinen
  • 43,252
  • 2
  • 75
  • 122
  • Thanks, now I understand. When I started thinking about that I din't know where to start, or how to ask the question. Thanks again. – Carlo Apr 05 '17 at 18:39
2

Any services that log visits will only have access to the IP address from which the request is coming from.

To map this to a domain name they will use a reverse DNS lookup (PTR record) so you need to make sure you have such a record configured for the IP address that maps to your domain.com

Phil
  • 3,138
  • 1
  • 21
  • 27
-1

I think you're asking how the internet at large can use "domain.com" to find your computer rather than using your IP address.

You need to set up a DNS A record with your ISP so your public IP can be resolved to your fully qualified domain name. If you're using a home or other network where your ISP won't allow you to create a DNS record, you can look into the many different DNS providers that will allow you to set up your A Record for free or cheaply. sitelutions.com is one example.

L.Ray
  • 101
  • 3
  • No, I want to use domain name as hostname, so when visiting some services my visit is shown as domain name. – Carlo Apr 05 '17 at 15:35
-2

If you mean to access your computer on your LAN from the public internet by using a domain name like PC1.xyz.com then you should use a DNS hosting provider which will allow you to map a fully qualified domain name to your static IP address. You can choose DNS hosting providers here.