-1

As a follow up to a question I've asked earlier: Linux server migration to Windows workstation. A supplier got us a new network-card yesterday, but no harddrives so far. I've also bit the bullet on reconfiguring the server as there was too much behavior on the old machine I couldn't explain/fix and the previous developers left without documenting anything. It'd also be good to upgrade from Ubuntu 14 to 20. Most work went smooth, only bind/dhcp have me scratching my head for the better part of the past 24 hours.

Goal

Set up bind9/DHCP and Shorewall and take a working config back home on a pendrive. Finalize everything there and test it before actually replacing the old machine.

VM Setup

I have VirtualBox6 running in my host; and have added two network adapters to it. The VDI is dynamically resizable for now to make the most of the small SSD we have available. Both adapters are attached to Bridged Adapter with default settings. I only picked the correct port for the two adapters in the VirtualBox dropdown 'Name:'

In my Guest

The Guest OS (Ubuntu 20.04 LTS) sees both network interfaces and when using ifconfig I can see two separate interface names for them (for simplicity):'A1' and 'A2'. A1 is connected to a Modem and gets an IP. I can browse the internet when this is attached. A2 should go to a switch, letting other devices connected to that switch use the intranet that should be on there. A1 uses the DHCP as given by a modem. I set A2 manually to 10.0.0.1 and 255.255.255.0 mask. I left the other fields blank.

Guest installations On my guest I've added ShoreWall (https://shorewall.org/), ISC (https://www.isc.org/dhcp/), Bind9(https://www.isc.org/bind/) and other applications. The three mentioned here are the last ones I'm having trouble with.

Guest configurations I copied over the config-files of the old machine to the new machine and replaced the freshly installed ones where needed after comparing them. When moving through versions I double checked the docs of the tool (Only Shorewall saw a version increment).

I started with Shorewall, where I used the new interfaces (A1 and A2) to replace the old interface names in the shorewall configuration files (host, interfaces, masq). After updating all the configuration files I got the firewall started with: sudo shorewall check which converted the masq to snat file (version upgrade) Next I started the firewall sudo shorewall start and checked the status sudo shorewall status. On every reboot of the VM Shorewall starts and the status tool does not report any issues.

Next I focused on bind9. There was no major version upgrade going from the old to the new server. As before I compared and copied the old files to /etc/bind/ adding them as needed. Rights, and chmods were checked and compared to the old server. One of the files is called intranet.sitename.org - it is supposed to get all calls going to it and point it to itself - there's also an Apacheserver on this server which can be accessed using the localhost/127.0.0.1 and 10.0.0.1.

After moving all config files I ran these commands:

sudo rndc reconfig
sudo rndc reload
sudo named-checkconf
sudo systemctl restart bind9

All commands passed without errors.

I then used nslookup to test my dns. nslookup ubuntu.com worked and gave the result as described here (https://serverspace.io/support/help/configure-bind9-dns-server-on-ubuntu/)

When using the intranet url however I got an NXDOMAIN error: nslookup intranet.sitename.de The full reply was: ** server can't find intranet.sitemane.de: NXDOMAIN

I emptied the cache, went over the configuration files again, but I can't find the issue. The issue might be related to the 'Server' that's reported by nslookup. When comparing it to the original machine, the value for 'Server' is 10.0.0.1, whereas on my new machine it report 127.0.0.1. There is however a db.10 file in /etc/bind which was copied from the old server and has correct access rights on it.

Questions

  1. Am I correct to use bridged adapters in Virtualbox? If not, how do I make sure that A1 and A2 are mapped to the correct physical wires coming out of the server?
  2. Is there another place where bind stores configuration files? I've found /etc/default on the web, but I have no files there for now.
  3. The old server does not have an IPV6 address, could this be related to the issue I'm having?
  4. How do I fix the NXDOMAIN for intranet sites error.

Any help and pointers are highly appreciated. Best regards.

2
  • Regarding DNS, it sounds like bind doesn't have your intranet zone configured - you obviously put the zone file there but bind has to be told to load the zone. I believe in Ubuntu this is done in /etc/bind/named.conf.local Jul 14, 2021 at 21:12
  • @BrandonXavier; the named.conf.local file is modified, it's one of the things I went over and over again. The intranet is configured like this: zone "intranet.sitename.de" { type master; file "/etc/bind/intranet.sitename.de"; } The file exists and has the proper rights on it. Jul 15, 2021 at 4:08

1 Answer 1

0

I found what was going on it had to do with an assumption I made moving from Ubuntu 14 to Ubuntu 20.

In Ubuntu14 there's a file /etc/network/interfaces which configured two ethernet ports on that machine. Starting from Ubuntu18 that file is not used any longer, in stead it is replaced by /etc/netplan/01-network-manager-all.yaml I configured that file to match the old server, rebooted and all is good.

Reference: https://linuxhint.com/ubuntu_20-04_network_configuration/ and https://vitux.com/how-to-configure-networking-with-netplan-on-ubuntu/

Hopefully it helps anyone facing similar issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .