does :::80 in netstat output means only ipv6 or ipv6+ipv4?












1















If I am listening on :::80, is it listening on all ipv6 or all ipv6+ipv4?



This is my netstat -tln:



tcp        0      0 :::8080                     :::*









share|improve this question




















  • 4





    Possible duplicate of meaning of Netstat local address column

    – Olorin
    Jan 23 at 6:43






  • 3





    @Olorin None of the answers in the question you linked to address the specific question asked (whether the socket listens on only ipv6 or both ipv6 and ipv4).

    – Johan Myréen
    Jan 23 at 7:50






  • 1





    @JohanMyréen "The above options show up as:- :::80 ... and translate to:- ... Listen on any IP address (IPv4 or IPv6)"

    – Olorin
    Jan 23 at 8:13






  • 3





    @Olorin As I wrote in my answer, the situation is not that clear-cut.

    – Johan Myréen
    Jan 23 at 8:18






  • 1





    @JohanMyréen in that case that answer should be edited, no?

    – Olorin
    Jan 23 at 8:20
















1















If I am listening on :::80, is it listening on all ipv6 or all ipv6+ipv4?



This is my netstat -tln:



tcp        0      0 :::8080                     :::*









share|improve this question




















  • 4





    Possible duplicate of meaning of Netstat local address column

    – Olorin
    Jan 23 at 6:43






  • 3





    @Olorin None of the answers in the question you linked to address the specific question asked (whether the socket listens on only ipv6 or both ipv6 and ipv4).

    – Johan Myréen
    Jan 23 at 7:50






  • 1





    @JohanMyréen "The above options show up as:- :::80 ... and translate to:- ... Listen on any IP address (IPv4 or IPv6)"

    – Olorin
    Jan 23 at 8:13






  • 3





    @Olorin As I wrote in my answer, the situation is not that clear-cut.

    – Johan Myréen
    Jan 23 at 8:18






  • 1





    @JohanMyréen in that case that answer should be edited, no?

    – Olorin
    Jan 23 at 8:20














1












1








1


2






If I am listening on :::80, is it listening on all ipv6 or all ipv6+ipv4?



This is my netstat -tln:



tcp        0      0 :::8080                     :::*









share|improve this question
















If I am listening on :::80, is it listening on all ipv6 or all ipv6+ipv4?



This is my netstat -tln:



tcp        0      0 :::8080                     :::*






networking ipv6 ipv4






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 23 at 10:36







Akhil J

















asked Jan 23 at 6:40









Akhil JAkhil J

447




447








  • 4





    Possible duplicate of meaning of Netstat local address column

    – Olorin
    Jan 23 at 6:43






  • 3





    @Olorin None of the answers in the question you linked to address the specific question asked (whether the socket listens on only ipv6 or both ipv6 and ipv4).

    – Johan Myréen
    Jan 23 at 7:50






  • 1





    @JohanMyréen "The above options show up as:- :::80 ... and translate to:- ... Listen on any IP address (IPv4 or IPv6)"

    – Olorin
    Jan 23 at 8:13






  • 3





    @Olorin As I wrote in my answer, the situation is not that clear-cut.

    – Johan Myréen
    Jan 23 at 8:18






  • 1





    @JohanMyréen in that case that answer should be edited, no?

    – Olorin
    Jan 23 at 8:20














  • 4





    Possible duplicate of meaning of Netstat local address column

    – Olorin
    Jan 23 at 6:43






  • 3





    @Olorin None of the answers in the question you linked to address the specific question asked (whether the socket listens on only ipv6 or both ipv6 and ipv4).

    – Johan Myréen
    Jan 23 at 7:50






  • 1





    @JohanMyréen "The above options show up as:- :::80 ... and translate to:- ... Listen on any IP address (IPv4 or IPv6)"

    – Olorin
    Jan 23 at 8:13






  • 3





    @Olorin As I wrote in my answer, the situation is not that clear-cut.

    – Johan Myréen
    Jan 23 at 8:18






  • 1





    @JohanMyréen in that case that answer should be edited, no?

    – Olorin
    Jan 23 at 8:20








4




4





Possible duplicate of meaning of Netstat local address column

– Olorin
Jan 23 at 6:43





Possible duplicate of meaning of Netstat local address column

– Olorin
Jan 23 at 6:43




3




3





@Olorin None of the answers in the question you linked to address the specific question asked (whether the socket listens on only ipv6 or both ipv6 and ipv4).

– Johan Myréen
Jan 23 at 7:50





@Olorin None of the answers in the question you linked to address the specific question asked (whether the socket listens on only ipv6 or both ipv6 and ipv4).

– Johan Myréen
Jan 23 at 7:50




1




1





@JohanMyréen "The above options show up as:- :::80 ... and translate to:- ... Listen on any IP address (IPv4 or IPv6)"

– Olorin
Jan 23 at 8:13





@JohanMyréen "The above options show up as:- :::80 ... and translate to:- ... Listen on any IP address (IPv4 or IPv6)"

– Olorin
Jan 23 at 8:13




3




3





@Olorin As I wrote in my answer, the situation is not that clear-cut.

– Johan Myréen
Jan 23 at 8:18





@Olorin As I wrote in my answer, the situation is not that clear-cut.

– Johan Myréen
Jan 23 at 8:18




1




1





@JohanMyréen in that case that answer should be edited, no?

– Olorin
Jan 23 at 8:20





@JohanMyréen in that case that answer should be edited, no?

– Olorin
Jan 23 at 8:20










1 Answer
1






active

oldest

votes


















5














A listening socket that is bound to ::, i.e. any address IPv6 address (INADDR6_ANY), may or may not also listen to connections using IPv4. This depends from several things:




  • Some operating systems are what is known as dual stack, and on those operating systems this depends from whether the IPV6_V6ONLY socket option is set on the listening socket (by the program that created the socket). Linux-based operating systems and FreeBSD are examples of such operating systems.

    The default behavior if the option is not explicitly set by a program is OS dependent. On Linux-based operating systems, for example, you can change this default by writing 0 or 1 to /proc/sys/net/ipv6/bindv6only.



  • Some other operating systems are not dual stack, and on those operating systems one cannot ever listen to both IPv6 and IPv4 with a single socket. OpenBSD is one such operating system.


On some operating systems, the output of netstat will tell you whether the socket is dual-stack. FreeBSD's netstat reports dual-stack sockets as tcp46 and udp46 in the first column of the output, for examples.




Thanks for your answer @Johan Myreen I want to improve this answer
with examples.




I am testing the ipv6_only behavior with both values.



1.



cat /proc/sys/net/ipv6/bindv6only
0
nc -6 -l 80
#server started
# netstat
tcp6 0 0 :::80 :::* LISTEN
# nc client
nc localhost 80
test
# server response
nc -6 -l 80
test
# from ipv6 now
nc ::1 80
test ipv6
# server response
nc -6 -l 80
test ipv6


2.



cat /proc/sys/net/ipv6/bindv6only
1
# server started
nc -6 -l 80
# connect to ipv4
nc localhost 80
nc: connect to localhost port 80 (tcp) failed: Connection refused
# connect to ipv6
nc ::1 80
test ipv6
# server respose
nc -6 -l 80
test ipv6


from above results we can see that value of /proc/sys/net/ipv6/bindv6only deciding the behaviour of ipv6 only or ipv6+ipv4






share|improve this answer





















  • 1





    The term dual stack is usually used in a context where you just care about having both IPv4 and IPv6 support and do not care about implementations details such as whether you use one or two sockets to achieve that result. As such what you describe for OpenBSD could still be called dual stack.

    – rfc2460
    Jan 25 at 13:08











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%2f496137%2fdoes-80-in-netstat-output-means-only-ipv6-or-ipv6ipv4%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









5














A listening socket that is bound to ::, i.e. any address IPv6 address (INADDR6_ANY), may or may not also listen to connections using IPv4. This depends from several things:




  • Some operating systems are what is known as dual stack, and on those operating systems this depends from whether the IPV6_V6ONLY socket option is set on the listening socket (by the program that created the socket). Linux-based operating systems and FreeBSD are examples of such operating systems.

    The default behavior if the option is not explicitly set by a program is OS dependent. On Linux-based operating systems, for example, you can change this default by writing 0 or 1 to /proc/sys/net/ipv6/bindv6only.



  • Some other operating systems are not dual stack, and on those operating systems one cannot ever listen to both IPv6 and IPv4 with a single socket. OpenBSD is one such operating system.


On some operating systems, the output of netstat will tell you whether the socket is dual-stack. FreeBSD's netstat reports dual-stack sockets as tcp46 and udp46 in the first column of the output, for examples.




Thanks for your answer @Johan Myreen I want to improve this answer
with examples.




I am testing the ipv6_only behavior with both values.



1.



cat /proc/sys/net/ipv6/bindv6only
0
nc -6 -l 80
#server started
# netstat
tcp6 0 0 :::80 :::* LISTEN
# nc client
nc localhost 80
test
# server response
nc -6 -l 80
test
# from ipv6 now
nc ::1 80
test ipv6
# server response
nc -6 -l 80
test ipv6


2.



cat /proc/sys/net/ipv6/bindv6only
1
# server started
nc -6 -l 80
# connect to ipv4
nc localhost 80
nc: connect to localhost port 80 (tcp) failed: Connection refused
# connect to ipv6
nc ::1 80
test ipv6
# server respose
nc -6 -l 80
test ipv6


from above results we can see that value of /proc/sys/net/ipv6/bindv6only deciding the behaviour of ipv6 only or ipv6+ipv4






share|improve this answer





















  • 1





    The term dual stack is usually used in a context where you just care about having both IPv4 and IPv6 support and do not care about implementations details such as whether you use one or two sockets to achieve that result. As such what you describe for OpenBSD could still be called dual stack.

    – rfc2460
    Jan 25 at 13:08
















5














A listening socket that is bound to ::, i.e. any address IPv6 address (INADDR6_ANY), may or may not also listen to connections using IPv4. This depends from several things:




  • Some operating systems are what is known as dual stack, and on those operating systems this depends from whether the IPV6_V6ONLY socket option is set on the listening socket (by the program that created the socket). Linux-based operating systems and FreeBSD are examples of such operating systems.

    The default behavior if the option is not explicitly set by a program is OS dependent. On Linux-based operating systems, for example, you can change this default by writing 0 or 1 to /proc/sys/net/ipv6/bindv6only.



  • Some other operating systems are not dual stack, and on those operating systems one cannot ever listen to both IPv6 and IPv4 with a single socket. OpenBSD is one such operating system.


On some operating systems, the output of netstat will tell you whether the socket is dual-stack. FreeBSD's netstat reports dual-stack sockets as tcp46 and udp46 in the first column of the output, for examples.




Thanks for your answer @Johan Myreen I want to improve this answer
with examples.




I am testing the ipv6_only behavior with both values.



1.



cat /proc/sys/net/ipv6/bindv6only
0
nc -6 -l 80
#server started
# netstat
tcp6 0 0 :::80 :::* LISTEN
# nc client
nc localhost 80
test
# server response
nc -6 -l 80
test
# from ipv6 now
nc ::1 80
test ipv6
# server response
nc -6 -l 80
test ipv6


2.



cat /proc/sys/net/ipv6/bindv6only
1
# server started
nc -6 -l 80
# connect to ipv4
nc localhost 80
nc: connect to localhost port 80 (tcp) failed: Connection refused
# connect to ipv6
nc ::1 80
test ipv6
# server respose
nc -6 -l 80
test ipv6


from above results we can see that value of /proc/sys/net/ipv6/bindv6only deciding the behaviour of ipv6 only or ipv6+ipv4






share|improve this answer





















  • 1





    The term dual stack is usually used in a context where you just care about having both IPv4 and IPv6 support and do not care about implementations details such as whether you use one or two sockets to achieve that result. As such what you describe for OpenBSD could still be called dual stack.

    – rfc2460
    Jan 25 at 13:08














5












5








5







A listening socket that is bound to ::, i.e. any address IPv6 address (INADDR6_ANY), may or may not also listen to connections using IPv4. This depends from several things:




  • Some operating systems are what is known as dual stack, and on those operating systems this depends from whether the IPV6_V6ONLY socket option is set on the listening socket (by the program that created the socket). Linux-based operating systems and FreeBSD are examples of such operating systems.

    The default behavior if the option is not explicitly set by a program is OS dependent. On Linux-based operating systems, for example, you can change this default by writing 0 or 1 to /proc/sys/net/ipv6/bindv6only.



  • Some other operating systems are not dual stack, and on those operating systems one cannot ever listen to both IPv6 and IPv4 with a single socket. OpenBSD is one such operating system.


On some operating systems, the output of netstat will tell you whether the socket is dual-stack. FreeBSD's netstat reports dual-stack sockets as tcp46 and udp46 in the first column of the output, for examples.




Thanks for your answer @Johan Myreen I want to improve this answer
with examples.




I am testing the ipv6_only behavior with both values.



1.



cat /proc/sys/net/ipv6/bindv6only
0
nc -6 -l 80
#server started
# netstat
tcp6 0 0 :::80 :::* LISTEN
# nc client
nc localhost 80
test
# server response
nc -6 -l 80
test
# from ipv6 now
nc ::1 80
test ipv6
# server response
nc -6 -l 80
test ipv6


2.



cat /proc/sys/net/ipv6/bindv6only
1
# server started
nc -6 -l 80
# connect to ipv4
nc localhost 80
nc: connect to localhost port 80 (tcp) failed: Connection refused
# connect to ipv6
nc ::1 80
test ipv6
# server respose
nc -6 -l 80
test ipv6


from above results we can see that value of /proc/sys/net/ipv6/bindv6only deciding the behaviour of ipv6 only or ipv6+ipv4






share|improve this answer















A listening socket that is bound to ::, i.e. any address IPv6 address (INADDR6_ANY), may or may not also listen to connections using IPv4. This depends from several things:




  • Some operating systems are what is known as dual stack, and on those operating systems this depends from whether the IPV6_V6ONLY socket option is set on the listening socket (by the program that created the socket). Linux-based operating systems and FreeBSD are examples of such operating systems.

    The default behavior if the option is not explicitly set by a program is OS dependent. On Linux-based operating systems, for example, you can change this default by writing 0 or 1 to /proc/sys/net/ipv6/bindv6only.



  • Some other operating systems are not dual stack, and on those operating systems one cannot ever listen to both IPv6 and IPv4 with a single socket. OpenBSD is one such operating system.


On some operating systems, the output of netstat will tell you whether the socket is dual-stack. FreeBSD's netstat reports dual-stack sockets as tcp46 and udp46 in the first column of the output, for examples.




Thanks for your answer @Johan Myreen I want to improve this answer
with examples.




I am testing the ipv6_only behavior with both values.



1.



cat /proc/sys/net/ipv6/bindv6only
0
nc -6 -l 80
#server started
# netstat
tcp6 0 0 :::80 :::* LISTEN
# nc client
nc localhost 80
test
# server response
nc -6 -l 80
test
# from ipv6 now
nc ::1 80
test ipv6
# server response
nc -6 -l 80
test ipv6


2.



cat /proc/sys/net/ipv6/bindv6only
1
# server started
nc -6 -l 80
# connect to ipv4
nc localhost 80
nc: connect to localhost port 80 (tcp) failed: Connection refused
# connect to ipv6
nc ::1 80
test ipv6
# server respose
nc -6 -l 80
test ipv6


from above results we can see that value of /proc/sys/net/ipv6/bindv6only deciding the behaviour of ipv6 only or ipv6+ipv4







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 23 at 10:36









Akhil J

447




447










answered Jan 23 at 7:47









Johan MyréenJohan Myréen

7,64411524




7,64411524








  • 1





    The term dual stack is usually used in a context where you just care about having both IPv4 and IPv6 support and do not care about implementations details such as whether you use one or two sockets to achieve that result. As such what you describe for OpenBSD could still be called dual stack.

    – rfc2460
    Jan 25 at 13:08














  • 1





    The term dual stack is usually used in a context where you just care about having both IPv4 and IPv6 support and do not care about implementations details such as whether you use one or two sockets to achieve that result. As such what you describe for OpenBSD could still be called dual stack.

    – rfc2460
    Jan 25 at 13:08








1




1





The term dual stack is usually used in a context where you just care about having both IPv4 and IPv6 support and do not care about implementations details such as whether you use one or two sockets to achieve that result. As such what you describe for OpenBSD could still be called dual stack.

– rfc2460
Jan 25 at 13:08





The term dual stack is usually used in a context where you just care about having both IPv4 and IPv6 support and do not care about implementations details such as whether you use one or two sockets to achieve that result. As such what you describe for OpenBSD could still be called dual stack.

– rfc2460
Jan 25 at 13:08


















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%2f496137%2fdoes-80-in-netstat-output-means-only-ipv6-or-ipv6ipv4%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 reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?