configuring two network interfaces on ubuntu 20.04
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.
Solution 1:
Apparently the reason for the problem was that I disabled the 'systemd-resolved' service. when I brought it back up everything started working.