I am having issue with my Ubuntu because I am unable to use wget or access any website with my current setup.
I have two NICs, enp2s0 and enp2s1.
enp2s0 is connected to the internet but connected to a NAT router (IP Address: 192.168.1.2)
While for enp2s1, it is connected to another router buth with no internet since it will only be used for internal networking (IP Address: 10.0.0.5)
If the only NIC connected is the one with the internet (enp2s0), the computer can access any website. But once the second NIC is connected (enp2s0 & enp2s1), the computer doesn't load any webpage, wget, or even apt-get update or apt-get install.
Is this something to do with iptables or routing? Help me out as I am new with this.
Here are some current details of the machine:
$ ip route show
default via 192.168.1.1 dev enp2s0 proto dhcp metric 20100
default via 10.0.0.1 dev enp2s1 proto dhcp metric 20101
169.254.0.0/16 dev enp2s0 scope link metric 1000
192.168.1.0/24 dev enp2s0 proto kernel scope link src 192.168.1.2 metric 100
10.0.0.0/24 dev enp2s1 proto kernel scope link src 10.0.0.5 metric 101
$ iptables -S -t nat; iptables -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
$ ip r
default via 192.168.1.1 dev enp2s0 proto dhcp metric 20100
default via 10.0.0.1 dev enp2s1 proto dhcp metric 20101
169.254.0.0/16 dev enp2s0scope link metric 1000
192.168.1.0/24 dev enp2s0 proto kernel scope link src 192.168.1.2 metric 100
10.0.0.0/24 dev enp2s1 proto kernel scope link src 10.0.0.5 metric 101
/etc/network/interfaces
auto lo
iface lo inet loopback
Since this is a newly installed ubuntu, we haven't maintained anything in the machine yet.
For the network 10.0.0.0/24 we wanted to have network connectivity for each device connected, (i.e., file sharing, web server checking) and it is completely isolated from internet.....
10.0.0.5 was given to the enp2s1 NIC since the router has its own DHCP, and 10.0.0.1 is the router gateway