none
Howto _disable_ ipv6 for mssql for linux RRS feed

  • Question

  • Hi,

    hope I'm right here.

    For security/overview reasons I want to disable IPv6 for "MSSQL 17 for Linux".
    Maybe someome has a hint/link for me to the correct parameter in the jungle of parameters.

    Ubuntu/Debian IPv6 is disabled, but
    netstat -tulpen says mssql-server is listening for tcp6.

    BTW. It is possible to get the actual configuration of the mssql-server (including the defaults)?
    Something like sshd -T

    TIA
    Jo


    • Edited by jofer.msdn Tuesday, August 13, 2019 11:25 AM
    Tuesday, August 13, 2019 11:22 AM

Answers

  • Hi jofer.msdn,

     

    Would you please try to use  sudo MSSQL_IP_ADDRESS=0.0.0.0 /opt/mssql/bin/mssql-conf setup in environment vars? It will force config to bind to ipv4 after restart.

     

    >>BTW. It is possible to get the actual configuration of the mssql-server (including the defaults)?

    Something like sshd -T

     

    Would you please refer to https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-2017#view-current-settings

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by jofer.msdn Wednesday, August 14, 2019 9:59 AM
    Wednesday, August 14, 2019 5:35 AM

All replies

  • Hi jofer.msdn,

     

    Would you please try to use  sudo MSSQL_IP_ADDRESS=0.0.0.0 /opt/mssql/bin/mssql-conf setup in environment vars? It will force config to bind to ipv4 after restart.

     

    >>BTW. It is possible to get the actual configuration of the mssql-server (including the defaults)?

    Something like sshd -T

     

    Would you please refer to https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-2017#view-current-settings

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by jofer.msdn Wednesday, August 14, 2019 9:59 AM
    Wednesday, August 14, 2019 5:35 AM

  • Hi Dedmon,

    works like expected, THX.
    --
    Some (not) short notes:

    >>>>BTW. It is possible to get the actual configuration of the mssql-server (including the defaults)? Something like sshd -T

    >>Would you please refer to https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-2017#view-current-settings

    Missed the little word "each" settings. (I hope you guys will not forget to update these reference on changes in future.)

    For interrested users:

    Ssearch for "net.ipv6.conf.all.disable_ipv6 = 1"

    >>>> [snip] disable IPv6 for "MSSQL 17 for Linux".
    >>[snip] MSSQL_IP_ADDRESS=0.0.0.0  It will force config to bind to ipv4 after restart.

    I made some fast tests:
    netstat -tulpen reports on  ...

    * sudo MSSQL_IP_ADDRESS=0.0.0.0 /opt/mssql/bin/mssql-conf setup

       tcp(4) yes and no tcp6 => as described by Dedmon, good.
    * sudo MSSQL_IP_ADDRESS=:: /opt/mssql/bin/mssql-conf setup
      No tcp(4) and tcp6 yes => good, but not documented!?
      * sudo MSSQL_IP_ADDRESS= /opt/mssql/bin/mssql-conf setup
    tcp(4) yes and tcp6 yes => good, but not documented!?

    Note for MS:
    In Configure SQL Server settings with environment variables on Linux (2017 and 2019pre)
    I found "MSSQL_IP_ADDRESS
    : Set the IP address.Currently, the IP address must be IPv4 style (0.0.0.0)." (Aug2019)

    please, feel free to correct my english ;-)
    Jo



    • Edited by jofer.msdn Wednesday, August 14, 2019 11:29 AM clarity
    Wednesday, August 14, 2019 11:25 AM