0

I have Ubuntu 14.10. When I'm at work I can browse the internet without problems. Now that I'm at home, I can connect, but I'm not able to browse the web.

Some informations:

the output of ifconfig:

marcosh@marcoshstudio:~$ ifconfig
lo        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:227 errors:0 dropped:0 overruns:0 frame:0
          TX packets:227 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:24638 (24.6 KB)  TX bytes:24638 (24.6 KB)

wlan0     Link encap:Ethernet  HWaddr 80:19:34:7d:8e:99  
          inet addr:192.168.1.66  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::8219:34ff:fe7d:8e99/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:769 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2001 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:87556 (87.5 KB)  TX bytes:234860 (234.8 KB)

I am using network-manager, and this is the output of nm-tool:

marcosh@marcoshstudio:~$ nm-tool

NetworkManager Tool

State: connected (global)

- Device: wlan0  [TNCAPC29DB1] -------------------------------------------------
  Type:              802.11 WiFi
  Driver:            iwlwifi
  State:             connected
  Default:           yes
  HW Address:        80:19:34:7D:8E:99

  Capabilities:
    Speed:           2 Mb/s

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

  Wireless Access Points (* = current AP)
    ReeKoWLAN:       Infra, 90:94:E4:75:78:B2, Freq 2412 MHz, Rate 54 Mb/s, Strength 34     WPA WPA2
    TISCALI:         Infra, 9C:97:26:9C:9F:7B, Freq 2462 MHz, Rate 54 Mb/s, Strength 90
    *TNCAPC29DB1:    Infra, 58:98:35:C2:9D:B1, Freq 2437 MHz, Rate 54 Mb/s, Strength 58    WPA WPA2
    InfostradaWiFi-408829: Infra, 40:CB:A8:8E:EC:C8, Freq 2417 MHz, Rate 54 Mb/s, Strength   45 WPA WPA2

  IPv4 Settings:
    Address:         192.168.1.66
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.1.254

    DNS:             192.168.1.254
    DNS:             8.8.8.8 

I am worried the somehow the settings in the file /etc/resolv.conf are interfering:

marcosh@marcoshstudio:~$ cat /etc/resolv.conf
domain mva.local
search mva.local
nameserver 192.168.242.1

Is that possible?

I know (since I did that another time) that if I remove and reinstall the network-manager, I will be able to browse from home but not from the office. How can I avoid this and solve my problem once for all?

1

While there might be several possibilities, I suggest we first look at a few of the most likely candidates. If Network Manager is using dnsmasq, as is the default, then /etc/resolv.conf ought to read:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1

Let's check:

cat /etc/NetworkManager/NetworkManager.conf

The default configuration is:

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

As you can see, dnsmasq is enabled. If it is not on your system, we will edit the file to correct it.

Next, click the Network Manager icon, select Edit Connections > Wi-Fi > your_network > IPv4 settings. Be certain that the Method is Automatic (DHCP).

Next, let's edit /etc/resolv.conf:

gksudo gedit /etc/resolv.conf

Use nano or kate or leafpad if you don't have the text editor gedit. Change the file to read:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1

Proofread carefully, save and close the text editor. Finally, restart NM:

sudo service network-manager restart

Test:

ping -c3 www.ubuntu.com
1
  • thanks a lot for your reply. I just solved the problem, see my answer
    – marcosh
    Jan 10 '15 at 16:32
1

Eventually I solved it using

sudo dpkg-reconfigure resolvconf

see this for more informations

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.