Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm experimenting with Linux and networks. What I'm trying to do is disable IPv4 for remote connections. It shouldn't be that complicated but I didn't find much about this topic. However, there is one solution which seems to work.

I cannot remember where I got that from but the comand ifconfig eth0 0 seems to remove the IPv4 address from eth0, leaving the interface only with its IPv6 address. That it what I wanted to achive, but now I wonder how I did it. I don't know what this command actually does since I didn't find these parameters in the ifconfig manual.

Can someone point out to me, what this command does? I don't want to use it for the wrong reasons. Also, if there are alternative ideas on how to disable IPv4, I'd like to hear them.

Thanks in advance!

share|improve this question
up vote 7 down vote accepted

Yes, the command ifconfig eth0 0 zeros (removes) the IP address assigned to interface eth0. From the manual of ifconfig, you can read:

ifconfig [-v] interface [aftype] options | address ...

However, the command I use to remove IP from an interface is:

ip addr del IP_add_ress/mask dev eth0
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.