3

Using ubuntu 11.04, I run netstat -nplt the results for local address may be

localhost:6666

or

[::]:6666

What is the difference?

I believe that the [::]: binds the service at port xxxx to all interfaces, (lo, eth0, eth1 ) and localhost: only binds it to loopback interface (lo). I think I am missing something. How can I toggle between the two states?

Dave
  • 357
  • 2
  • 5
  • 10

2 Answers2

4

localhost:6666

This is the IPv4 loopback address 127.0.0.1

[::]:6666

This means port 6666 on all IP addresses (v4 and v6).

user9517
  • 114,104
  • 20
  • 206
  • 289
2

[::] is an ipv6 notation and it's the same as 0000:0000:0000:0000:0000:0000:0000:0000 , and it means any ip address.

0wn3r
  • 846
  • 1
  • 8
  • 21