I'm trying to install nodejs on my Ubuntu server but it seems not to be able to reach the internet.My server has two network interfaces:eth0 connected to my networketh1 used sometimes to be connected to a second network and usually not used.My network gateway is 192.168.0.1 on a common class C network.When I try to ping any host inside my network, everything goes fine but when I try to ping the gateway, I can't receive any response and the same happens when I try to ping any external domain, regardless of the correct name resolution provided by my DNS.Here is my configuration:ifconfig:root:~# ifconfigeth0      Link encap:Ethernet  HWaddr a4:5d:36:c3:44:18          inet addr:192.168.0.168  Bcast:192.168.0.255  Mask:255.255.255.0          inet6 addr: fe80::a65d:36ff:fec3:4418/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:31531 errors:0 dropped:108 overruns:0 frame:0          TX packets:6734 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:3896820 (3.8 MB)  TX bytes:930411 (930.4 KB)          Interrupt:16eth1      Link encap:Ethernet  HWaddr a4:5d:36:c3:44:19          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0          UP BROADCAST MULTICAST  MTU:1500  Metric:1          RX packets:0 errors:0 dropped:0 overruns:0 frame:0          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)          Interrupt:17lo        Link encap:Local Loopback          inet addr:127.0.0.1  Mask:255.0.0.0          inet6 addr: ::1/128 Scope:Host          UP LOOPBACK RUNNING  MTU:65536  Metric:1          RX packets:16 errors:0 dropped:0 overruns:0 frame:0          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:68235 (68.2 KB)  TX bytes:68235 (68.2 KB) my routes:root@:~# ip route showdefault via 192.168.0.1 dev eth0192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.168192.168.1.0/24 dev eth1  proto kernel  scope link  src 192.168.1.1/etc/network/interfaces# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback network interfaceauto lo        iface lo inet loopbackauto eth0        iface eth0 inet static        metric 0        address 192.168.0.168        netmask 255.255.255.0        network 192.168.0.0        broadcast 192.168.0.255        gateway 192.168.0.1        dns-nameservers 192.168.0.3 192.168.0.2auto eth1        iface eth1 inet static        metric 1        address 192.168.1.1        netmask 255.255.255.0        gateway 192.168.0.168        dns-nameservers 192.168.1.1 192.168.0.168Where is the problem?
Ubuntu: I cannot reach internet
ubuntu;networking;network interface
Please edit /etc/sysctl.conf and add these lines to the bottom:net.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1net.ipv6.conf.lo.disable_ipv6 = 1then run command sysctl -puse sudo if you are not logged in as root. Then you should see this on the terminal:net.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1net.ipv6.conf.lo.disable_ipv6 = 1and cat /proc/sys/net/ipv6/conf/all/disable_ipv6should give output of 1Then try pinging the 192.168.0.1 IP address again again.EDITSeems like commenting out the IPV6 entries in /etc/hosts file were also needed. Figured out after a chat session.