What do `0.0.0.0:*`, `[::]:mysql`, and `[::]:*` mean in netstat output?












-2















$ sudo netstat -ap | grep postg
tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN 1567/postgres
udp 0 0 localhost:57504 localhost:57504 ESTABLISHED 1567/postgres
unix 2 [ ACC ] STREAM LISTENING 27116 1567/postgres /var/run/postgresql/.s.PGSQL.5432

$ sudo netstat -ap | grep mysql
tcp6 0 0 [::]:mysql [::]:* LISTEN 23683/mysqld
tcp6 0 0 [::]:33060 [::]:* LISTEN 23683/mysqld
unix 2 [ ACC ] STREAM LISTENING 1169294 23683/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 1169513 23683/mysqld /var/run/mysqld/mysqlx.sock
unix 2 [ ] DGRAM 1169211 23683/mysqld


What do 0.0.0.0:*, [::]:mysql, and [::]:* mean?



Does * mean all ports?



0.0.0.0 means ‘‘this network’’ or ‘‘this host’', according to Tanenbaum's Computer Network. When is it used for this network, and when is it for this host?



Thanks.










share|improve this question


















  • 1





    Actually…it's listening socket, so it doesn't have foreign address, so I would say it means nothing.

    – 炸鱼薯条德里克
    4 hours ago











  • Thanks. (1) I am still wondering what it means literally. (2) What does [::]:mysql mean?

    – Tim
    3 hours ago













  • (1) it's not a word in any human language, you need provide context, as in your question (2) listening on all local IP address with TCP Port mysql, I don't know the corresponding number

    – 炸鱼薯条德里克
    3 hours ago
















-2















$ sudo netstat -ap | grep postg
tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN 1567/postgres
udp 0 0 localhost:57504 localhost:57504 ESTABLISHED 1567/postgres
unix 2 [ ACC ] STREAM LISTENING 27116 1567/postgres /var/run/postgresql/.s.PGSQL.5432

$ sudo netstat -ap | grep mysql
tcp6 0 0 [::]:mysql [::]:* LISTEN 23683/mysqld
tcp6 0 0 [::]:33060 [::]:* LISTEN 23683/mysqld
unix 2 [ ACC ] STREAM LISTENING 1169294 23683/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 1169513 23683/mysqld /var/run/mysqld/mysqlx.sock
unix 2 [ ] DGRAM 1169211 23683/mysqld


What do 0.0.0.0:*, [::]:mysql, and [::]:* mean?



Does * mean all ports?



0.0.0.0 means ‘‘this network’’ or ‘‘this host’', according to Tanenbaum's Computer Network. When is it used for this network, and when is it for this host?



Thanks.










share|improve this question


















  • 1





    Actually…it's listening socket, so it doesn't have foreign address, so I would say it means nothing.

    – 炸鱼薯条德里克
    4 hours ago











  • Thanks. (1) I am still wondering what it means literally. (2) What does [::]:mysql mean?

    – Tim
    3 hours ago













  • (1) it's not a word in any human language, you need provide context, as in your question (2) listening on all local IP address with TCP Port mysql, I don't know the corresponding number

    – 炸鱼薯条德里克
    3 hours ago














-2












-2








-2








$ sudo netstat -ap | grep postg
tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN 1567/postgres
udp 0 0 localhost:57504 localhost:57504 ESTABLISHED 1567/postgres
unix 2 [ ACC ] STREAM LISTENING 27116 1567/postgres /var/run/postgresql/.s.PGSQL.5432

$ sudo netstat -ap | grep mysql
tcp6 0 0 [::]:mysql [::]:* LISTEN 23683/mysqld
tcp6 0 0 [::]:33060 [::]:* LISTEN 23683/mysqld
unix 2 [ ACC ] STREAM LISTENING 1169294 23683/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 1169513 23683/mysqld /var/run/mysqld/mysqlx.sock
unix 2 [ ] DGRAM 1169211 23683/mysqld


What do 0.0.0.0:*, [::]:mysql, and [::]:* mean?



Does * mean all ports?



0.0.0.0 means ‘‘this network’’ or ‘‘this host’', according to Tanenbaum's Computer Network. When is it used for this network, and when is it for this host?



Thanks.










share|improve this question














$ sudo netstat -ap | grep postg
tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN 1567/postgres
udp 0 0 localhost:57504 localhost:57504 ESTABLISHED 1567/postgres
unix 2 [ ACC ] STREAM LISTENING 27116 1567/postgres /var/run/postgresql/.s.PGSQL.5432

$ sudo netstat -ap | grep mysql
tcp6 0 0 [::]:mysql [::]:* LISTEN 23683/mysqld
tcp6 0 0 [::]:33060 [::]:* LISTEN 23683/mysqld
unix 2 [ ACC ] STREAM LISTENING 1169294 23683/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 1169513 23683/mysqld /var/run/mysqld/mysqlx.sock
unix 2 [ ] DGRAM 1169211 23683/mysqld


What do 0.0.0.0:*, [::]:mysql, and [::]:* mean?



Does * mean all ports?



0.0.0.0 means ‘‘this network’’ or ‘‘this host’', according to Tanenbaum's Computer Network. When is it used for this network, and when is it for this host?



Thanks.







netstat ip-address






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









TimTim

27.9k78269486




27.9k78269486








  • 1





    Actually…it's listening socket, so it doesn't have foreign address, so I would say it means nothing.

    – 炸鱼薯条德里克
    4 hours ago











  • Thanks. (1) I am still wondering what it means literally. (2) What does [::]:mysql mean?

    – Tim
    3 hours ago













  • (1) it's not a word in any human language, you need provide context, as in your question (2) listening on all local IP address with TCP Port mysql, I don't know the corresponding number

    – 炸鱼薯条德里克
    3 hours ago














  • 1





    Actually…it's listening socket, so it doesn't have foreign address, so I would say it means nothing.

    – 炸鱼薯条德里克
    4 hours ago











  • Thanks. (1) I am still wondering what it means literally. (2) What does [::]:mysql mean?

    – Tim
    3 hours ago













  • (1) it's not a word in any human language, you need provide context, as in your question (2) listening on all local IP address with TCP Port mysql, I don't know the corresponding number

    – 炸鱼薯条德里克
    3 hours ago








1




1





Actually…it's listening socket, so it doesn't have foreign address, so I would say it means nothing.

– 炸鱼薯条德里克
4 hours ago





Actually…it's listening socket, so it doesn't have foreign address, so I would say it means nothing.

– 炸鱼薯条德里克
4 hours ago













Thanks. (1) I am still wondering what it means literally. (2) What does [::]:mysql mean?

– Tim
3 hours ago







Thanks. (1) I am still wondering what it means literally. (2) What does [::]:mysql mean?

– Tim
3 hours ago















(1) it's not a word in any human language, you need provide context, as in your question (2) listening on all local IP address with TCP Port mysql, I don't know the corresponding number

– 炸鱼薯条德里克
3 hours ago





(1) it's not a word in any human language, you need provide context, as in your question (2) listening on all local IP address with TCP Port mysql, I don't know the corresponding number

– 炸鱼薯条德里克
3 hours ago










1 Answer
1






active

oldest

votes


















2














0.0.0.0:* typically appears at the remote side of listening sockets, and indicates that remote address and port fields have not been filled in yet... which is logical for a socket that is listening for incoming connections. It has one meaning though: it indicates that this socket will only accept IPv4 connections.



[::]:mysql appears at the local side of connections, and indicates that the socket is accepting incoming IPv6 connections (and possibly also IPv4) in any addresses this system may have, and the port number has been given the name mysql in /etc/services... i.e. the port number is 3306. Note that the left-most column also has tcp6 instead of just tcp to indicate that the program is using the IPv6-capable sockets.



[::]:* is the IPv6-capable equivalent of 0.0.0.0:*, i.e. it typically appears at the remote side of listening sockets, and indicates that the socket is dealing with IPv6 connections but the remote endpoint address & port information has not been filled in yet. However, this may include IPv4 too.



The entire IPv4 address space can be mapped as a subset of IPv6 address space: for example, an IPv4 address 1.2.3.4 can be mapped by the kernel into IPv6 address ::ffff:102:304 if the application uses IPv6 sockets API. That's why an IPv6-capable program has the option of just using IPv6-style address structures internally in everything at the TCP/UDP level, and having no need to treat IPv4 as a separate group unless specifically desired. (I think there are socket options or some other mechanism that a program can use to opt in/out of this mapping: some programs do open separate listening sockets for IPv4 and IPv6.)



However, many IPv6-capable utilities will show such IPv6-mapped IPv4 addresses in a more user-friendly form of ::ffff:1.2.3.4 to make the embedded IPv4 address easier to read.






share|improve this answer
























  • Notice that 0.0.0.0:* socket is not an tcp6 socket. So… is it possible that a tcp6 socket only accept ipv4 connections? Which has 0.0.0.0:* shown in foreign address field of a tcp6 socket.

    – 炸鱼薯条德里克
    3 hours ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507564%2fwhat-do-0-0-0-0-mysql-and-mean-in-netstat-output%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














0.0.0.0:* typically appears at the remote side of listening sockets, and indicates that remote address and port fields have not been filled in yet... which is logical for a socket that is listening for incoming connections. It has one meaning though: it indicates that this socket will only accept IPv4 connections.



[::]:mysql appears at the local side of connections, and indicates that the socket is accepting incoming IPv6 connections (and possibly also IPv4) in any addresses this system may have, and the port number has been given the name mysql in /etc/services... i.e. the port number is 3306. Note that the left-most column also has tcp6 instead of just tcp to indicate that the program is using the IPv6-capable sockets.



[::]:* is the IPv6-capable equivalent of 0.0.0.0:*, i.e. it typically appears at the remote side of listening sockets, and indicates that the socket is dealing with IPv6 connections but the remote endpoint address & port information has not been filled in yet. However, this may include IPv4 too.



The entire IPv4 address space can be mapped as a subset of IPv6 address space: for example, an IPv4 address 1.2.3.4 can be mapped by the kernel into IPv6 address ::ffff:102:304 if the application uses IPv6 sockets API. That's why an IPv6-capable program has the option of just using IPv6-style address structures internally in everything at the TCP/UDP level, and having no need to treat IPv4 as a separate group unless specifically desired. (I think there are socket options or some other mechanism that a program can use to opt in/out of this mapping: some programs do open separate listening sockets for IPv4 and IPv6.)



However, many IPv6-capable utilities will show such IPv6-mapped IPv4 addresses in a more user-friendly form of ::ffff:1.2.3.4 to make the embedded IPv4 address easier to read.






share|improve this answer
























  • Notice that 0.0.0.0:* socket is not an tcp6 socket. So… is it possible that a tcp6 socket only accept ipv4 connections? Which has 0.0.0.0:* shown in foreign address field of a tcp6 socket.

    – 炸鱼薯条德里克
    3 hours ago
















2














0.0.0.0:* typically appears at the remote side of listening sockets, and indicates that remote address and port fields have not been filled in yet... which is logical for a socket that is listening for incoming connections. It has one meaning though: it indicates that this socket will only accept IPv4 connections.



[::]:mysql appears at the local side of connections, and indicates that the socket is accepting incoming IPv6 connections (and possibly also IPv4) in any addresses this system may have, and the port number has been given the name mysql in /etc/services... i.e. the port number is 3306. Note that the left-most column also has tcp6 instead of just tcp to indicate that the program is using the IPv6-capable sockets.



[::]:* is the IPv6-capable equivalent of 0.0.0.0:*, i.e. it typically appears at the remote side of listening sockets, and indicates that the socket is dealing with IPv6 connections but the remote endpoint address & port information has not been filled in yet. However, this may include IPv4 too.



The entire IPv4 address space can be mapped as a subset of IPv6 address space: for example, an IPv4 address 1.2.3.4 can be mapped by the kernel into IPv6 address ::ffff:102:304 if the application uses IPv6 sockets API. That's why an IPv6-capable program has the option of just using IPv6-style address structures internally in everything at the TCP/UDP level, and having no need to treat IPv4 as a separate group unless specifically desired. (I think there are socket options or some other mechanism that a program can use to opt in/out of this mapping: some programs do open separate listening sockets for IPv4 and IPv6.)



However, many IPv6-capable utilities will show such IPv6-mapped IPv4 addresses in a more user-friendly form of ::ffff:1.2.3.4 to make the embedded IPv4 address easier to read.






share|improve this answer
























  • Notice that 0.0.0.0:* socket is not an tcp6 socket. So… is it possible that a tcp6 socket only accept ipv4 connections? Which has 0.0.0.0:* shown in foreign address field of a tcp6 socket.

    – 炸鱼薯条德里克
    3 hours ago














2












2








2







0.0.0.0:* typically appears at the remote side of listening sockets, and indicates that remote address and port fields have not been filled in yet... which is logical for a socket that is listening for incoming connections. It has one meaning though: it indicates that this socket will only accept IPv4 connections.



[::]:mysql appears at the local side of connections, and indicates that the socket is accepting incoming IPv6 connections (and possibly also IPv4) in any addresses this system may have, and the port number has been given the name mysql in /etc/services... i.e. the port number is 3306. Note that the left-most column also has tcp6 instead of just tcp to indicate that the program is using the IPv6-capable sockets.



[::]:* is the IPv6-capable equivalent of 0.0.0.0:*, i.e. it typically appears at the remote side of listening sockets, and indicates that the socket is dealing with IPv6 connections but the remote endpoint address & port information has not been filled in yet. However, this may include IPv4 too.



The entire IPv4 address space can be mapped as a subset of IPv6 address space: for example, an IPv4 address 1.2.3.4 can be mapped by the kernel into IPv6 address ::ffff:102:304 if the application uses IPv6 sockets API. That's why an IPv6-capable program has the option of just using IPv6-style address structures internally in everything at the TCP/UDP level, and having no need to treat IPv4 as a separate group unless specifically desired. (I think there are socket options or some other mechanism that a program can use to opt in/out of this mapping: some programs do open separate listening sockets for IPv4 and IPv6.)



However, many IPv6-capable utilities will show such IPv6-mapped IPv4 addresses in a more user-friendly form of ::ffff:1.2.3.4 to make the embedded IPv4 address easier to read.






share|improve this answer













0.0.0.0:* typically appears at the remote side of listening sockets, and indicates that remote address and port fields have not been filled in yet... which is logical for a socket that is listening for incoming connections. It has one meaning though: it indicates that this socket will only accept IPv4 connections.



[::]:mysql appears at the local side of connections, and indicates that the socket is accepting incoming IPv6 connections (and possibly also IPv4) in any addresses this system may have, and the port number has been given the name mysql in /etc/services... i.e. the port number is 3306. Note that the left-most column also has tcp6 instead of just tcp to indicate that the program is using the IPv6-capable sockets.



[::]:* is the IPv6-capable equivalent of 0.0.0.0:*, i.e. it typically appears at the remote side of listening sockets, and indicates that the socket is dealing with IPv6 connections but the remote endpoint address & port information has not been filled in yet. However, this may include IPv4 too.



The entire IPv4 address space can be mapped as a subset of IPv6 address space: for example, an IPv4 address 1.2.3.4 can be mapped by the kernel into IPv6 address ::ffff:102:304 if the application uses IPv6 sockets API. That's why an IPv6-capable program has the option of just using IPv6-style address structures internally in everything at the TCP/UDP level, and having no need to treat IPv4 as a separate group unless specifically desired. (I think there are socket options or some other mechanism that a program can use to opt in/out of this mapping: some programs do open separate listening sockets for IPv4 and IPv6.)



However, many IPv6-capable utilities will show such IPv6-mapped IPv4 addresses in a more user-friendly form of ::ffff:1.2.3.4 to make the embedded IPv4 address easier to read.







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









telcoMtelcoM

19.4k12448




19.4k12448













  • Notice that 0.0.0.0:* socket is not an tcp6 socket. So… is it possible that a tcp6 socket only accept ipv4 connections? Which has 0.0.0.0:* shown in foreign address field of a tcp6 socket.

    – 炸鱼薯条德里克
    3 hours ago



















  • Notice that 0.0.0.0:* socket is not an tcp6 socket. So… is it possible that a tcp6 socket only accept ipv4 connections? Which has 0.0.0.0:* shown in foreign address field of a tcp6 socket.

    – 炸鱼薯条德里克
    3 hours ago

















Notice that 0.0.0.0:* socket is not an tcp6 socket. So… is it possible that a tcp6 socket only accept ipv4 connections? Which has 0.0.0.0:* shown in foreign address field of a tcp6 socket.

– 炸鱼薯条德里克
3 hours ago





Notice that 0.0.0.0:* socket is not an tcp6 socket. So… is it possible that a tcp6 socket only accept ipv4 connections? Which has 0.0.0.0:* shown in foreign address field of a tcp6 socket.

– 炸鱼薯条德里克
3 hours ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507564%2fwhat-do-0-0-0-0-mysql-and-mean-in-netstat-output%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

濃尾地震

How to rewrite equation of hyperbola in standard form

No ethernet ip address in my vocore2