AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  Disable IPv6 for samba

    Posted Tue February 07, 2023 01:32 AM
    If an AIX system has both IPv4 address and IPv6 address, it seems that samba does not work. After IPv6 interface is disabled on OS, samba is working i.e. others can connect to it for samba shares. I've tired adding an 'interfaces = xxxx' option to samba config but it does not help. How can I keep IPv6 interface up and meanwhile still make samba working? Thanks.

    ------------------------------
    Herman Mei
    ------------------------------


  • 2.  RE: Disable IPv6 for samba

    Posted Wed February 08, 2023 05:10 AM

    Try having two interfaces on the same VLAN.  One with IPv4 only (which you specify in interfaces=xxx), and another with IPv6 only.



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 3.  RE: Disable IPv6 for samba

    Posted Wed February 08, 2023 02:29 PM
    Hi José,

    The AIX instance is on PowerVS, so the two network interfaces are in different VLANs, e.g., en0 is in private IPv4 subnet, en1 is IPv6 only for the instance management (VRMC). In samba config, I've tried adding 'interfaces = en0' or 'interfaces = ent0' or 'interfaces = 10.x.x.x'. When iPv6 interface is up, samba always complains 'no interfaces are found' and hence fails at binding socket. when IPv6 interface is disabled from OS, samba is stated and running ok. It seems that samba is not able to determine network interfaces (a failing function like getlocaladdress?). The IPv4 address and loopback address are in /etc/hosts and I've set the instance to query local hosts first.  My samba version is 4.14.4.

    Any thoughts on why samba can not determine network interfaces?

    Thanks.

    Herman







    ------------------------------
    Herman Mei
    ------------------------------



  • 4.  RE: Disable IPv6 for samba

    Posted Wed February 08, 2023 05:16 PM

    Samba is supposed to be IPv6-ready since somewhere in version 3.

    Maybe some interaction with name resolution ?  (check that hostname and fqdn both resolve to the IPv4 address, and that the IPv4 address resolves to the fqdn, check that there is a "domain" entry in /etc/resolv.conf, check that netsvc.conf contains hosts=local, bind4, bind6)

    Did you try adding to the global section:
    interfaces = 10.x.x.x
    bind interfaces only




    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 5.  RE: Disable IPv6 for samba

    Posted Wed February 08, 2023 10:09 PM

    yes the entries are added under global section.

    And IPv4 forward and reverse lookup are in place, netsvc.conf and resolv.conf have the stuff you've described.

    Yet still get 'no interfaces are found' when trying to start samba while IPv6 interface is up.



    ------------------------------
    Herman Mei
    ------------------------------



  • 6.  RE: Disable IPv6 for samba

    Posted Wed February 15, 2023 12:39 PM

    I tried this on Power Virtual Server and I can get Samba to stay up.
    This is my smb.conf:
    #
            workgroup = MYGROUP
            server string = Samba Server Version %v
     
    ;       netbios name = MYSERVER
     
        interfaces = lo 192.168.200.10/28
        bind interfaces only = yes
     
    ;       interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
    ;       hosts allow = 127. 192.168.12. 192.168.13.
    My ifconfig:
    # ifconfig -a
    en1: flags=1e084863,81cc0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN>
            inet6 fe80::8c2c:bcff:feaa:48a8/64
             tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
    en0: flags=1e084863,81cc0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN>
            inet 192.168.200.10 netmask 0xfffffff0 broadcast 192.168.200.15
             tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
    sit0: flags=8100041<UP,RUNNING,LINK0>
            inet6 ::192.168.200.10/96
    lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
            inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
            inet6 ::1%1/128
             tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1



    ------------------------------
    Samuel Matzek
    ------------------------------



  • 7.  RE: Disable IPv6 for samba

    Posted Wed February 15, 2023 12:43 PM
      |   view attached

    I'm having trouble posting my Samba logs in-line in the message so I'm attaching them as a file.



    ------------------------------
    Samuel Matzek
    ------------------------------

    Attachment(s)

    txt
    sambastartAndLogs.txt   1 KB 1 version