rhel 主机名被修改成bogon的问题

bogan ['bogən] ['bəugən]

bogon是指那些不该出现在internet路由表中的地址。
这些地址应该包括:
1,私有地址如10,172.16-32,192.168.....
2,还未正式分配出去的地址

bogon定义:

Bogon is a bogus IP address and an informal name for an IP packet on the public Internet that claims to be from an area of the IP address space reserved, but not yet allocated or delegated by the Internet Assigned Numbers Authority (IANA) or a delegated Regional Internet Registry (RIR). The areas of unallocated address space are called the bogon space.

For example, addresses from 49.0.0.0 – 49.255.255.255 have not yet been allocated.[1]

Bogons are not the same as reserved private address ranges, such as 10.x.x.x and 192.168.x.x.

Which are reserved for private networks.[2]

Many ISPs and end-user firewalls filter and block bogons, because they have no legitimate use, and usually are the result of accidental or malicious misconfiguration. Bogons can be filtered by using router ACLs, or by BGP blackholing.

IP addresses that are bogon today may not be bogon tomorrow. IANA and other registries frequently assign new address space to ISPs. Announcements of new assignments are often published on network operators’ mailing lists (such as NANOG) to ensure that operators have a chance to remove bogon filtering for addresses that have become legitimate.

IANA maintains a list of allocated and reserved IPv4 netblocks. [1]

除了上面的定义之外,还有一种定义的说法:

bogon就是Martians(就是私有地址和保留地址的称呼,详见RFC1918和RFC5735)和IANA未分配给RIR的并集。

这里有一份由IANA维护的IPV4分配列表

在这里可以看到 005/8就是未分配的地址,也就是bogon range。

同时还有一个概念叫做Fullbogons,它的定义范围比bogon还要大,指的是那些虽然IANA分配给RIR的地址,但是这些地址RIR没有分配给ISP或者end-user使用的地址。

所以来讲,bongon是没有什么用处的,需要在路由上设置ACL或者做BGP BLACKHOLING过滤掉

那么,我的主机名变成bogon是怎么回事又该怎么办呢?

可能是在反向解析IP时,DNS没有过滤bogon,所以把内网的IP反向解析成了bogon

所以把DNS换成一个过滤了bongon的DNS即可

======================================
解决办法:

一:使用hostname命令 [root@test ~]# hostname yourname 这样只是临时更改了主机名。
二:修改linux主机的配置文件/etc/sysconfig/network 和 /etc/hosts
1.修改/etc/sysconfig/network里面的主机名字。
# vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=yourname //在这修改hostname GATEWAY=192.168.1.1
2.修改/etc/hosts里面的名字 # vi /etc/hosts 127.0.0.1 localhost.localdomain localhost 192.168.1.121 yourname //在这修改hostname //有时候只有这一行 127.0.0.1 yourname localhost.localdomain localhost
3.让更改的名字在不重启机器下生效
# hostname yourname # su
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(2498) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值