Score:0

configuring two network interfaces on ubuntu 20.04

ma flag
yal

First a bit of background on the problem, I'm trying to create a dynamic malware analysis lab so I'm running inetsim on this ubuntu vm and I have a couple of other vm's on the internal network settings of virtualbox.

Now I'm trying to add regular internet connectivity to this machine (the malware is running on the machines connected to this one and not on this one) but it's not working. I can ping other servers but when I try and fire up Firefox I'm browsing back to the Inetsim server and not outside of my internal network.

I am pretty sure that the problem is related to DNS because nslookup doesn't work.

currently my netplan configuration file looks like this where enp0s8 is the internal network and enp0s3 is the NAT.

network:
    version: 2
    renderer: networkd
    ethernets:
            enp0s8:
                    dhcp4: no
                    addresses: [10.0.0.1/24]
            enp0s3:
                    dhcp4: yes

output of ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:b6:32:91 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
       valid_lft 86314sec preferred_lft 86314sec
    inet6 fe80::a00:27ff:feb6:3291/64 scope link 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:01:9c:cb brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.1/24 brd 10.0.0.255 scope global enp0s8
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe01:9ccb/64 scope link 
       valid_lft forever preferred_lft forever

output of ip route

default via 10.0.2.2 dev enp0s3 proto dhcp src 10.0.2.15 metric 100 
10.0.0.0/24 dev enp0s8 proto kernel scope link src 10.0.0.1 
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 
10.0.2.2 dev enp0s3 proto dhcp scope link src 10.0.2.15 metric 100 

would love to here any kind of help.

Score:1
ma flag
yal

Apparently the reason for the problem was that I disabled the 'systemd-resolved' service. when I brought it back up everything started working.

Score:0
us flag

The routing tables look consistent in the output of ip route. If you believe there is a DNS problem, two things:

  • try to ping hosts by IP to verify the routing; e.g., ping 1.1.1.1.
  • check the DNS Servers output of resolvectl status. If there are none, that definitely points to a DNS configuration problem as you suggested.

If there are no DNS servers listed, or the addresses are incorrect, you either need to fix this on your DHCP server (since under your current config, that's where DNS information comes from), or else add the following config:

        enp0s3:
                dhcp4: yes
                dhcp4-overrides:
                  use-dns: false
                nameservers:
                  addresses: [your correct IPs]
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.