[Users] /etc/hosts
Farkas Levente
lfarkas at bppiac.hu
Mon Dec 11 09:43:13 EST 2006
Kirill Korotaev wrote:
> Farkas Levente wrote:
>> hi,
>> why put openvz into each VE's /etc/hosts the hostname itself too? ie:
>> 127.0.0.1 host.example.com host localhost localhost.localdomain
>> and why do this on all reboot, why not accept
>> 127.0.0.1 localhost localhost.localdomain
>> it has some reasons?
>> thanks.
>> yours.
>>
>
> If HOSTNAME set in VE config it is updated on every VE start.
> hostname is bound to 127.0.0.1 for simplicity of updates on ip change i.e
> it doesn't depend on ip in such a scheme.
ok, but in this case all tool like netstat, iptables etc.. assumes
127.0.0.1 as hostname and it's really annoying netstat -lt:
------------------------------
# netstat -lt
tcp 0 0 host.example.com:smtp *:* LISTEN
tcp 0 0 host.example.com:smtp *:* LISTEN
# netstat -ltn
tcp 0 0 127.0.0.1:smtp *:* LISTEN
tcp 0 0 1.2.3.4:smtp *:* LISTEN
------------------------------
--
Levente "Si vis pacem para bellum!"
More information about the Users
mailing list