Skip to content

Samba DC restore fails with same VPN IP address #7835

@DavidePrincipi

Description

@DavidePrincipi

Samba DC restoration fails if the source DC was bound to the same VPN IP address available on the destination host, e.g. 10.5.4.1.

Steps to reproduce

Expected behavior

Restore is successful, DC services are started, bound to 10.5.4.1, e.g.:

~]# ss -tulpn | grep 53
udp   UNCONN 0      0             10.5.4.1:53         0.0.0.0:*    users:(("dns[master]",pid=450501,fd=48))                                                                                   udp   UNCONN 0      0            127.0.0.1:53         0.0.0.0:*    users:(("dns[master]",pid=450501,fd=46))
tcp   LISTEN 0      10           127.0.0.1:53         0.0.0.0:*    users:(("dns[master]",pid=450501,fd=44))
tcp   LISTEN 0      10            10.5.4.1:53         0.0.0.0:*    users:(("dns[master]",pid=450501,fd=47)) 

Actual behavior

The samba-dc container enters a crashloop. Post-exec hook fails to bind port 53:

Jan 26 14:37:07 rl1 bash[71808]: /usr/bin/bash: line 1: /dev/tcp/10.5.4.1/53: Connection refused

The module environment has no PREFIXLEN variable set. This is wrong with VPN IP address, it should be PREFIXLEN=24 or similar. Samba needs PREFIXLEN if the interface (wg0) has no broadcast address, otherwise it fails to start its subsystems.

Components

  • samba 3.4.1

See also


Thanks to @nrauso

Metadata

Metadata

Assignees

Labels

testingPackages are available from testing repositories

Type

Projects

Status

Testing

Relationships

None yet

Development

No branches or pull requests

Issue actions