Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

I am having trouble permanently removing 127.0.1.1 from debian hosts file

yongsikleeyongsiklee Member, Host Rep

I am having trouble permanently removing 127.0.1.1.
While it is said that that entry can be replaced with an IP address and when I did that, it reappears in the hosts file after rebooting. This is the first time this entry shows back up after it being removed. Any solution?

Comments

  • chattr +i /etc/hosts

  • ehabehab Member

    @jiggawattz said:
    chattr +i /etc/hosts

    unless you get permission denied even with root.
    i recall it was lxc or some non kvm config.

    Thanked by 1yongsiklee
  • @yongsiklee said:
    I am having trouble permanently removing 127.0.1.1.
    While it is said that that entry can be replaced with an IP address and when I did that, it reappears in the hosts file after rebooting. This is the first time this entry shows back up after it being removed. Any solution?

    Could you explain what you /actually/ are trying to achieve?
    Probably what you think is a solution (removing the line with 127.0.1.1) is not what you want.

    Thanked by 1yongsiklee
  • yongsikleeyongsiklee Member, Host Rep

    @reinob said:

    @yongsiklee said:
    I am having trouble permanently removing 127.0.1.1.
    While it is said that that entry can be replaced with an IP address and when I did that, it reappears in the hosts file after rebooting. This is the first time this entry shows back up after it being removed. Any solution?


    Could you explain what you /actually/ are trying to achieve?
    Probably what you think is a solution (removing the line with 127.0.1.1) is not what you want.

    I am replacing 127.0.1.1 with a public IP address but it came back (adding to the replacing entry) after rebooting.

  • yongsikleeyongsiklee Member, Host Rep
    edited March 2023

    @jiggawattz said:
    chattr +i /etc/hosts

    Thank you. It worked! :D

    *Just for the reminder for myself, chattr -i will remove immutability^^

  • yongsikleeyongsiklee Member, Host Rep

    @yongsiklee said:

    @jiggawattz said:
    chattr +i /etc/hosts

    Thank you. It worked! :D

    *Just for the reminder for myself, chattr -i will remove immutability^^

    Oops! Got error msgs while installing Proxmox.
    I guess it was not a permanent solution. :'(

  • If this is for installing proxmox on debian, then disable cloud init for hosts override. That will permanently solve the issue.

    Thanked by 2Falzo yongsiklee
Sign In or Register to comment.