Ubuntu: Network work only on some sites



Question:

i tried to create a ftp server to my home and i went to my router settings and pressed enable on DMZ for port forwarding... now no site is working except Stackoverflow and AskUbuntu... ( IDK HOW ). i have tried to reset router and turn off / on but nothing works... my phone and the other computers detecting the internet but is loading forever. ping aswell showing me this:

ping: www.google.com: Name or service not known  

or when i try stackoverflow or askubuntu with pings its giving me the same error as google ^^ but i can access through the firefox webbrowser. BTW: I Posted this post from my machine which has the internet problems.

Im using cable, and here is output: Sorry but im from phone so i needed to type everything:

cat /etc/network/interfaces:

# This file describes the network interfaces available on your system  # and how to activate them. For more information, see interfaces(5).    source /etc/network/interfaces.d/*    # The loopback network interface  auto lo  iface lo inet loopback    # The primary network interface  auto enp4s0  iface enp4a0 inet dhcp  

And here is: sudo lshw -C network:

*-network  description: Ethernet interface  Product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller  Vendor: Realtek Semiconductor Co., Ltd.  Physical id: 0  Bus info: pci@0000:04:00.0  Logical Name: enp4s0  Version: 0c  Serial: bc:ee:7b:8d:85:82  Size:  1Gbit/s  Capacity: 1Gbit/s  Width: 64 bits  Clock: 33 MHz  Capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation   configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip=10.100.102.7 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s  Resources: irq:35 ioport:d000(size=256) memory:fe100000-fe100fff memory:f2100000-f2103fff  

Sorry for the mess i tried to take photo but i have issue with that and i couldn't find the in the phone...


Solution:1

  • You have a typo in your /etc/network/interfaces file:

In terminal...

gksudo gedit /etc/network/interfaces  

Change this:

iface enp4a0 inet dhcp  

To this:

iface enp4s0 inet dhcp  

Then reboot your computer.

  • And also, replace your r8169 driver:

In terminal...

sudo apt-get update    sudo apt-get install r8168-dkms    reboot  
  • Lastly, make sure that your MTU setting in your Wired Connection network profile is set for 1500 or automatic. Same thing in your router.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »