大网数据广告活动
服务器运维问答

How to set public hostname

· 52CE 我爱测

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 addr…

问题原文

原帖链接 · Carlo · CC BY-SA 3.0

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

已采纳解答

原帖链接 · Esa Jokinen · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-04-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。