Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

up vote 6 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

 
discard

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.