Skip to content

Consider another argument for --ip to test both 1xIPv4 and IPv6 #1026

@sanderjo

Description

@sanderjo

Please make sure that you provide enough information so that we understand what your issue is about.

If you combine " --ip one" with "-6", testssl tests one IPv4 (as expected), but all IPv6s. I had expected just one IP tested.

./testssl.sh --protocols --ip one -6 nl.sslusenet.com:nntps

$ host nl.sslusenet.com
nl.sslusenet.com has address 81.171.92.220
nl.sslusenet.com has address 81.171.92.234
nl.sslusenet.com has IPv6 address 2001:4de0:1::234
nl.sslusenet.com has IPv6 address 2001:4de0:1::220

So 2 IPv4 (of which 1 is tested) plus 2 IPv6 (of which 2 are tested) addresses. I would have expected one IP tested, based on the documentation:

     --ip <ip>                     a) tests the supplied <ip> v4 or v6 address instead of resolving host(s) in URI
                                   b) arg "one" means: just test the first DNS returns (useful for multiple IPs)

     -6                            also use IPv6. Works only with supporting OpenSSL version and IPv6 connectivity

Leaving out the "-6" is not an option, because I also test IPv6 only servers.

  1. testssl version from the banner (testssl.sh -b 2>/dev/null | head -4 | tail -2)
    testssl.sh       2.9dev from https://testssl.sh/dev/
    (9915219 2018-03-28 11:46:53 -- )
  1. what exactly was happening, output is needed

See below

  1. what did you expect instead?

Just one IP tested, be it IPv4 or IPv6.

  1. steps to reproduce

    1. testssl.sh command line

./testssl.sh --protocols --ip one -6 nl.sslusenet.com:nntps

1. if possible: target IP

1. openssl version used (testssl.sh -b 2>/dev/null | head -16 | tail -3)
 Using "OpenSSL 1.0.2-chacha (1.0.2i-dev)" [~183 ciphers]
 on haring:./bin/openssl.Linux.i686
 (built: "Jun 22 19:48:51 2016", platform: "linux-elf")
1. your operating system (uname -a)

Linux haring 3.13.0-143-generic #192-Ubuntu SMP Tue Feb 27 10:46:44 UTC 2018 i686 i686 i686 GNU/Linux

Full output

sander@haring:~/git/testssl.sh$ ./testssl.sh --protocols --ip one -6 nl.sslusenet.com:nntps

###########################################################
    testssl.sh       2.9dev from https://testssl.sh/dev/
    (9915219 2018-03-28 11:46:53 -- )

      This program is free software. Distribution and
             modification under GPLv2 permitted.
      USAGE w/o ANY WARRANTY. USE IT AT YOUR OWN RISK!

       Please file bugs @ https://testssl.sh/bugs/

###########################################################

 Using "OpenSSL 1.0.2-chacha (1.0.2i-dev)" [~183 ciphers]
 on haring:./bin/openssl.Linux.i686
 (built: "Jun 22 19:48:51 2016", platform: "linux-elf")


Testing all IPv4 addresses (port nntps): 81.171.92.220 2001:4de0:1::220 2001:4de0:1::234
--------------------------------------------------------------------------------------------------------
 Start 2018-03-29 05:40:45        -->> 81.171.92.220:nntps (nl.sslusenet.com) <<--

 further IP addresses:   81.171.92.234 2001:4de0:1::220 2001:4de0:1::234
 A record via            supplied IP "81.171.92.220"
 rDNS (81.171.92.220):   --
 Service detected:       Couldn't determine what's running on port nntps, assuming no HTTP service => skipping all HTTP checks


 Testing protocols via sockets except NPN+ALPN

 SSLv2      not offered (OK)
 SSLv3      offered (NOT ok)
 TLS 1      offered
 TLS 1.1    offered
 TLS 1.2    offered (OK)
 TLS 1.3    not offered
 NPN/SPDY   not offered
 ALPN/HTTP2 not offered

 Done 2018-03-29 05:40:56 [  16s] -->> 81.171.92.220:nntps (nl.sslusenet.com) <<--

--------------------------------------------------------------------------------------------------------
 Start 2018-03-29 05:40:56        -->> [2001:4de0:1::220]:nntps (nl.sslusenet.com) <<--

 further IP addresses:    81.171.92.220 81.171.92.234 2001:4de0:1::234
 A record via             supplied IP "81.171.92.220"
 rDNS (2001:4de0:1::220): --
 Service detected:        Couldn't determine what's running on port nntps, assuming no HTTP service => skipping all HTTP checks


 Testing protocols via sockets except NPN+ALPN

 SSLv2      not offered (OK)
 SSLv3      offered (NOT ok)
 TLS 1      offered
 TLS 1.1    offered
 TLS 1.2    offered (OK)
 TLS 1.3    not offered
 NPN/SPDY   not offered
 ALPN/HTTP2 not offered

 Done 2018-03-29 05:41:06 [  26s] -->> [2001:4de0:1::220]:nntps (nl.sslusenet.com) <<--

--------------------------------------------------------------------------------------------------------
 Start 2018-03-29 05:41:06        -->> [2001:4de0:1::234]:nntps (nl.sslusenet.com) <<--

 further IP addresses:    81.171.92.220 81.171.92.234 2001:4de0:1::220
 A record via             supplied IP "81.171.92.220"
 rDNS (2001:4de0:1::234): --
 Service detected:        Couldn't determine what's running on port nntps, assuming no HTTP service => skipping all HTTP checks


 Testing protocols via sockets except NPN+ALPN

 SSLv2      not offered (OK)
 SSLv3      offered (NOT ok)
 TLS 1      offered
 TLS 1.1    offered
 TLS 1.2    offered (OK)
 TLS 1.3    not offered
 NPN/SPDY   not offered
 ALPN/HTTP2 not offered

 Done 2018-03-29 05:41:17 [  37s] -->> [2001:4de0:1::234]:nntps (nl.sslusenet.com) <<--

--------------------------------------------------------------------------------------------------------
Done testing now all IP addresses (on port nntps): 81.171.92.220 2001:4de0:1::220 2001:4de0:1::234

sander@haring:~/git/testssl.sh$

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions