[Samba] Samba generating wrong ipv6 and ipv4 address

Patrik alabard at gmail.com
Sat Aug 3 12:18:17 UTC 2019


sorry i mean dnsupdate, if i use bind9 with samba dlz dnsupdate does not
work, so  i have to leave it out.
my problem is that i got 2 interfaces and still it 2 dual stack ip
addresses, the 192.168.78.0/24 is correct.
the 192.168.81.0/24 is giving 192.168.81.120 instead of 192.168.81.20.
i found the whole root since "/" with grep there is no 192.168.81.120 at
all. only in my router there is for my dolby address is 192.168.81.120, but
it is not even turned on.

*it get this (with bind9 and dlz it is instead of dnsupdate), so i got:*
patrikx3 at bitang:~$ nslookup p3x-dc.patrikx3.com
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
Name: p3x-dc.patrikx3.com
Address: *192.168.81.120*
Name: p3x-dc.patrikx3.com
Address: 192.168.78.20
Name: p3x-dc.patrikx3.com
Address: 2001:470:1f1b:5b3::20
Name: p3x-dc.patrikx3.com
Address: *2001:470:1f1b:5b5:eeaa:a0ff:fe1b:4d84*
Name: p3x-dc.patrikx3.com
Address: 2001:470:1f1b:5b3:21b:21ff:fea6:ce93

*no i idea where it gets. it should as if shows in my ifconfig (the blond
that it should do with the dlz, where it gives this numbers i have no
idea):*
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:29:44:41:78  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp1s0f2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet *192.168.81.20*  netmask 255.255.255.0  broadcast
192.168.81.255
        inet6 2001:470:1f1b:5b5::20  prefixlen 128  scopeid 0x0<global>
        inet6 *2001:470:1f1b:5b5:21b:21ff:fea6:ce92*  prefixlen 64  scopeid
0x0<global>
        inet6 fe80::21b:21ff:fea6:ce92  prefixlen 64  scopeid 0x20<link>
        ether 00:1b:21:a6:ce:92  txqueuelen 1000  (Ethernet)
        RX packets 1852657  bytes 452613729 (431.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2472224  bytes 804229294 (766.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xdf080000-df0fffff

enp1s0f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.78.20  netmask 255.255.255.0  broadcast 192.168.78.255
        inet6 2001:470:1f1b:5b3::20  prefixlen 128  scopeid 0x0<global>
        inet6 2001:470:1f1b:5b3:21b:21ff:fea6:ce93  prefixlen 64  scopeid
0x0<global>
        inet6 fe80::21b:21ff:fea6:ce93  prefixlen 64  scopeid 0x20<link>
        ether 00:1b:21:a6:ce:93  txqueuelen 1000  (Ethernet)
        RX packets 5262443  bytes 3532092699 (3.2 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6375538  bytes 6140883280 (5.7 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xdf000000-df07ffff

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 474460  bytes 272421934 (259.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 474460  bytes 272421934 (259.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

*my bind settings is this:*
root at server:~# cat /etc/bind/named.conf.local
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";



// the order is important!!!! first internal, then external!!!


view "internal-enp1s0f3" {
    match-clients { "internal-enp1s0f3"; };
    match-recursive-only yes;
    recursion yes;
    allow-recursion { "internal-enp1s0f3"; };

    notify yes;
    allow-update { none; };
    allow-query { any; };
    allow-transfer { xfer; };
    include "/etc/bind/named.conf.default-zones";

    zone "patrikx3.com" {
        type master;
        file "/etc/bind/zones/enp1s0f3/patrikx3.com";
       * include "/var/lib/samba/private/named.conf.update";*
    };


    zone "corifeus.com" {
        type master;
        file "/etc/bind/zones/enp1s0f3/corifeus.com";
    };

    zone "gitlist.tk" {
        type master;
        file "/etc/bind/zones/enp1s0f3/gitlist.tk";
    };


    zone "albafructus.eu" {
        type master;
        file "/etc/bind/zones/enp1s0f3/albafructus.eu";
    };


    zone "fruitinfo.hu" {
        type master;
        file "/etc/bind/zones/enp1s0f3/fruitinfo.hu";
    };


    zone "venyimgyumolcse.hu" {
        type master;
        file "/etc/bind/zones/enp1s0f3/venyimgyumolcse.hu";
    };



  *  include "/var/lib/samba/private/named.conf";*

};


view "internal-enp1s0f2" {
    match-clients { "internal-enp1s0f2"; };
    match-recursive-only yes;
    recursion yes;
    allow-recursion { "internal-enp1s0f2"; };
     notify yes;
    allow-update { none; };
    allow-query { any; };
    allow-transfer { xfer; };

    include "/etc/bind/named.conf.default-zones";

    zone "patrikx3.com" {
        type master;
        file "/etc/bind/zones/enp1s0f2/patrikx3.com";
*//        include "/var/lib/samba/private/named.conf.update"; *
    };

    zone "corifeus.com" {
        type master;
        file "/etc/bind/zones/enp1s0f2/corifeus.com";
    };

    zone "gitlist.tk" {
        type master;
        file "/etc/bind/zones/enp1s0f2/gitlist.tk";
    };

    zone "albafructus.eu" {
        type master;
        file "/etc/bind/zones/enp1s0f2/albafructus.eu";
    };

    zone "fruitinfo.hu" {
        type master;
        file "/etc/bind/zones/enp1s0f2/fruitinfo.hu";
    };


    zone "venyimgyumolcse.hu" {
        type master;
        file "/etc/bind/zones/enp1s0f2/venyimgyumolcse.hu";
    };



*//    include "/var/lib/samba/private/named.conf";*
};


view "external" {
    match-clients { any; };

    recursion no;
    additional-from-auth no;
    additional-from-cache no;

//    allow-transfer { any; }; // temporarily allowed for debugging purposes
    allow-transfer { none; };

//    zone "namesystem.tk" IN {
//        type master;
//        file "/etc/bind/zones/external.namesystem.tk";
//    };
};


*my samba and it should be correct:*
root at server:~# cat /etc/samba/smb.conf
# Global parameters
[global]
bind interfaces only = Yes
# if this is turned on, always perfect
# interfaces = lo 192.168.78.20 2001:470:1f1b:5b3:21b:21ff:fea6:ce93
interfaces = lo 192.168.78.20 2001:470:1f1b:5b3:21b:21ff:fea6:ce93
192.168.81.20 2001:470:1f1b:5b5:21b:21ff:fea6:ce92
#        interfaces = lo 192.168.81.20 2001:470:1f1b:5b5:21b:21ff:fea6:ce92
# if all interfaces known, order is important, the last is the required
# interfaces = lo 192.168.78.20 192.168.81.20
netbios name = SERVER
realm = P3X-DC.PATRIKX3.COM
# server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl,
winbindd, ntp_signd, kcc, dnsupdate
server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbindd,
ntp_signd, kcc
workgroup = P3X-DC
allow insecure wide links = Yes
# before was working
unix extensions = no
server role = active directory domain controller
idmap_ldb:use rfc2307 = yes
comment =
# log level = 3
template shell = /bin/bash
template homedir = /home/%U

[netlogon]
path = /var/lib/samba/sysvol/p3x-dc.patrikx3.com/scripts
read only = No

[sysvol]
path = /var/lib/samba/sysvol
read only = No

[media]
        path = /media
        read only = no
        guest ok = no
        force group = media
        writable = yes

[mounts]
        path = /mnt
        read only = no
        guest ok = no
        force group = mount
        writable = yes

[router-logs]
        path = /var/log-router
        read only = yes
        guest ok = yes
        writable = no
        browseable = yes
#       valid users = router
        force user = root
        follow symlinks = yes
        wide links = yes



*Where samba via dlz generates the 192.168.81.20 and
2001:470:1f1b:5b5:eeaa:a0ff:fe1b:4d84, it is out of my control. The other
subnet is correct.*
*I know i have 2 interfaces and i only can set in bind to set and update on
the main and that is correct, but even though where it gets that 2nd
interfaces just like not random, but totally wrong.*

*Patrik*
WWW <https://patrikx3.com> | GitHub <https://github.com/patrikx3/> | NPM
<https://www.npmjs.com/~patrikx3> | Corifeus <https://corifeus.com> | +36
20 342 8046




On Sat, Aug 3, 2019 at 12:52 PM Rowland penny via samba <
samba at lists.samba.org> wrote:

> On 03/08/2019 11:17, Patrik wrote:
> > the problem is that dnsupdate is not working becuase i use dlz. i
> > cannot use dbsupdate with dnsupdate it fails.
> > *_
> > _*
>
> What is 'dbsupdate' ?
>
> I can assure you that dnsupdate does work with dlz.
>
> I think you need to give us more info.
>
> Rowland
>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list