Fix you resolving and routing tables and it should work fine.
And i can show a simple way with systemd.
No iproute, no ip rules/tables setup needed at al.
This is why i use systemd-networkd for it these days.
Then thats all done in only the config of the interface.
https://raw.githubusercontent.com/thctlo/debian-scripts/master/setup-systemd-networkd.sh
This script convers any setup to a systemd setup, it does not change anything.
It drops a config file where you run it and it asumes a 1 inteface and 1 ip
setup.
But thats easy to adapt.
Per example. Below will result in.
Internal, dns resolves to internal.domain.tld and domain.tld but only if the
request are coming on ETH0
www.domain.tld point in the AD-DC dns to my LAN site of the webserver.
External, dns resolves to domain.tld but only if the request are coming on ETH1
These use the internet DNS, and now your routing and resolving order is correct
in one setup.
# LAN interface
#/etc/systemd/network/lan-dev.network
#
# Configure global settings in /etc/systemd/*.conf
#
# Dont forget : rm /etc/resolv.conf
# ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
#
# Note, ADDC, ntp time to same (external source)
[Match]
Name=eth0
[Network]
DHCP=no
DNSSEC=allow-downgrade
IPv6PrivacyExtensions=no
IPv6AcceptRouterAdvertisements=no
LinkLocalAddressing=no
# ADDC, IP internet NTP server
# Member, IP AD-DC for NTP.
NTP=IPS_OF_NTP_SERVERS
#
DNS=192.168.0.1 192.168.0.2
#
Domains=internal.domain.tld domain.tld
Address=192.168.0.1/24
Gateway=192.168.0.1
[Route]
Destination=10.0.0.0/16
Gateway=192.168.0.1
# WAN interface
# /etc/systemd/network/wan-dev.network
#
# Dont forget : rm /etc/resolv.conf
# ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
[Match]
Name=eth1
[Network]
DHCP=no
DNSSEC=allow-downgrade
LLMNR=no
IPv6PrivacyExtensions=no
IPv6AcceptRouterAdvertisements=no
LinkLocalAddressing=no
# choose 1-3 internet dns servers.
DNS=8.8.8.8 8.8.4.4 1.1.2.2
Domains=domain.tld
# IPv4 gateway and primary address.
Address=1.2.3.4/29
Gateway=1.2.3.1/29
Greetz,
Louis
> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens
> Rowland penny via samba
> Verzonden: donderdag 19 december 2019 14:39
> Aan: samba at lists.samba.org
> Onderwerp: Re: [Samba] Samba public IP issue
>
> On 19/12/2019 12:21, cristiant--- via samba wrote:
> > Hello,
> > I am running two Samba Domain Controllers on as VMs
> installed on two
> > physical hosts. I've managed to bind them and to run the
> replication.
> > My issues is that the private IP address is advertised and the
> > replication fails. Even though I update the DNS entry? after a few
> > minutes the changes are overwritten and the replication fails again.
> > Can someone help me with this issue? Is there any option to
> make this
> > changes permanent? Or ruining a DC on a VM is a good approach?
>
> So you have DC1 in one VM and DC2 in another, it also sounds
> like they
> have IPs that keep changing.
>
> Running DCs in a VM is an acceptable practice, so it sounds like you
> have something set up incorrectly.
>
> What are the VMs ?
>
> What OS are they running ?
>
> Are the IPs set on the DCs fixed or set by DHCP ?
>
> What OS is running on computer that the VMs are running on ?
>
> Are the VMs and the host using the same IP range ?
>
> Rowland
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
>