2

This is the first time I ask here, so feel free to make any changes to the question if needed. Also, English is not my first language, so sorry for any mistake.

Firstly, I have a virtual machine (VirtualBox) running Zentyal 5.0 as the main server with 2 network interfaces:

  • eth0 as 192.168.1.2 with 192.168.1.1 (router) as its gateway.
  • eth1 as 192.168.2.2, which will connect my internal network with the Internet.

Gateway set to 192.168.2.2 and DNS set to "local Zentyal DNS".

Eth1 will provide IP's through DHCP to the Ubuntu server below.

Secondly, I have an Ubuntu 16.04 with 2 network interfaces too:
-enp0s3 with DHCP IP (lets say 192.168.2.3, an IP within the DHCP range).
-enp0s8 as 10.0.0.1, which will also provide IP's using DHCP.

Edit: My /etc/network/interfaces looks like this:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto enp0s3
iface enp0s3 inet dhcp

auto enp0s8
iface enp0s8 inet static
address 10.0.0.1
gateway 10.0.0.1
netmask 255.0.0.0
network 10.0.0.0
broadcast 10.0.0.255
dns-nameservers 192.168.2.2

Edit: When I run systemctl restart networking.service I get an error, Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details. and automatically creates a conexion called 'enp0s8', which has 10.0.0.1 as IP but not gateway neither DNS server.

My /etc/dhcp/dhcpd.conf for enp0s8 looks like this:

option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

authoritative;

subnet 10.0.0.0 netmask 255.0.0.0 {
  range 10.0.0.2 10.0.0.12;
  option domain-name-servers 8.8.8.8, 4.4.4.4;
  option domain-name "zentyal-domain.lan";
  option routers 10.0.0.1;
  option broadcast-address 10.0.0.255;
  default-lease-time 600;
  max-lease-time 7200;
}

So my main question is, what do I have to do/change to make the Ubuntu server redirect the dns queries from the clients in its network (10.0.0.0) to the Zentyal server?

(I know I have to change option domain-name-servers 8.8.8.8, 4.4.4.4;, for example).

In Zentyal, I can do what I think is the same I'm asking for here just by adding an IP, like in the image:

enter image description here

I hope the question is specific and clear enough. If not, I'll try to make any necessary changes.

Note: I tried configuring the Ubuntu server as an Only forwarding DNS server but it didn't work, probably because I did something wrong.

0

You must log in to answer this question.

Browse other questions tagged .