无法获取更新、电子邮件和互联网访问,Ubuntu 12.04 LTS

无法获取更新、电子邮件和互联网访问,Ubuntu 12.04 LTS

我正在使用无线连接。

屏幕右上角的连接图标表明我确实已连接,但更新管理器、电子邮件连接和互联网访问失败。

操作系统是 Ubuntu 12.04 LTS。我使用工作电脑访问此帮助网站,希望得到一些有关这些问题的指导。我对 Ubuntu 和 Linux 都很陌生。上次更新日期为 7 月 30 日。

话虽如此,任何有关诊断步骤的建议或任何其他有用的指导都会受到欢迎。

ping -c4 4.2.2.2route | grep default没有返回任何东西。

ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:22:4d:50:b3:9e  
          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:20 Memory:f0400000-f0420000 

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:16436  Metric:1 
          RX packets:3384 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:3384 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:0 
          RX bytes:187028 (187.0 KB)  TX bytes:187028 (187.0 KB) 

wlan0     Link encap:Ethernet  HWaddr 6c:62:6d:23:d0:c0  
          inet addr:192.168.0.5  Bcast:192.168.0.255  Mask:255.255.255.0 
          inet6 addr: fe80::6e62:6dff:fe23:d0c0/64 Scope:Link 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:32293 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:145 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:2382888 (2.3 MB)  TX bytes:10990 (10.9 KB) 

IP地址:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 
    inet 127.0.0.1/8 scope host lo 
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever 
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000 
    link/ether 00:22:4d:50:b3:9e brd ff:ff:ff:ff:ff:ff 
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 
    link/ether 6c:62:6d:23:d0:c0 brd ff:ff:ff:ff:ff:ff 
    inet 192.168.0.5/24 brd 192.168.0.255 scope global wlan0 
    inet6 fe80::6e62:6dff:fe23:d0c0/64 scope link 
       valid_lft forever preferred_lft forever

配置:

eth0      no wireless extensions. 

lo        no wireless extensions. 

wlan0     IEEE 802.11bgn  ESSID:"CGnetwork"   
          Mode:Managed  Frequency:2.437 GHz  Access Point: A0:21:B7:F7:EF:DB    
          Bit Rate=72.2 Mb/s   Tx-Power=20 dBm    
          Retry  long limit:7   RTS thr:off   Fragment thr:off 
          Power Management:on 
          Link Quality=59/70  Signal level=-51 dBm   
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0 
          Tx excessive retries:13  Invalid misc:6   Missed beacon:0 

ping 和 dconf read 没有产生任何结果。

iptables -L:

Chain INPUT (policy DROP) 
target     prot opt source               destination          
ufw-before-logging-input  all  --  anywhere             anywhere             
ufw-before-input  all  --  anywhere             anywhere             
ufw-after-input  all  --  anywhere             anywhere             
ufw-after-logging-input  all  --  anywhere             anywhere             
ufw-reject-input  all  --  anywhere             anywhere             
ufw-track-input  all  --  anywhere             anywhere             

Chain FORWARD (policy DROP) 
target     prot opt source               destination          
ufw-before-logging-forward  all  --  anywhere             anywhere             
ufw-before-forward  all  --  anywhere             anywhere             
ufw-after-forward  all  --  anywhere             anywhere             
ufw-after-logging-forward  all  --  anywhere             anywhere             
ufw-reject-forward  all  --  anywhere             anywhere             

Chain OUTPUT (policy DROP) 
target     prot opt source               destination          
ufw-before-logging-output  all  --  anywhere             anywhere             
ufw-before-output  all  --  anywhere             anywhere             
ufw-after-output  all  --  anywhere             anywhere             
ufw-after-logging-output  all  --  anywhere             anywhere             
ufw-reject-output  all  --  anywhere             anywhere             
ufw-track-output  all  --  anywhere             anywhere             

Chain ufw-after-forward (1 references) 
target     prot opt source               destination          

Chain ufw-after-input (1 references) 
target     prot opt source               destination          
ufw-skip-to-policy-input  udp  --  anywhere             anywhere             udp dpt:netbios-ns 
ufw-skip-to-policy-input  udp  --  anywhere             anywhere             udp dpt:netbios-dgm 
ufw-skip-to-policy-input  tcp  --  anywhere             anywhere             tcp dpt:netbios-ssn 
ufw-skip-to-policy-input  tcp  --  anywhere             anywhere             tcp dpt:microsoft-ds 
ufw-skip-to-policy-input  udp  --  anywhere             anywhere             udp dpt:bootps 
ufw-skip-to-policy-input  udp  --  anywhere             anywhere             udp dpt:bootpc 
ufw-skip-to-policy-input  all  --  anywhere             anywhere             ADDRTYPE match dst-type BROADCAST 

Chain ufw-after-logging-forward (1 references) 
target     prot opt source               destination          
LOG        all  --  anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] " 

Chain ufw-after-logging-input (1 references) 
target     prot opt source               destination          
LOG        all  --  anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] " 

Chain ufw-after-logging-output (1 references) 
target     prot opt source               destination          
LOG        all  --  anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] " 

Chain ufw-after-output (1 references) 
target     prot opt source               destination          

Chain ufw-before-forward (1 references) 
target     prot opt source               destination          
ufw-user-forward  all  --  anywhere             anywhere             

Chain ufw-before-input (1 references) 
target     prot opt source               destination          
ACCEPT     all  --  anywhere             anywhere             
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED 
ufw-logging-deny  all  --  anywhere             anywhere             state INVALID 
DROP       all  --  anywhere             anywhere             state INVALID 
ACCEPT     icmp --  anywhere             anywhere             icmp destination-unreachable 
ACCEPT     icmp --  anywhere             anywhere             icmp source-quench 
ACCEPT     icmp --  anywhere             anywhere             icmp time-exceeded 
ACCEPT     icmp --  anywhere             anywhere             icmp parameter-problem 
ACCEPT     icmp --  anywhere             anywhere             icmp echo-request 
ACCEPT     udp  --  anywhere             anywhere             udp spt:bootps dpt:bootpc 
ufw-not-local  all  --  anywhere             anywhere             
ACCEPT     udp  --  anywhere             224.0.0.251          udp dpt:mdns 
ACCEPT     udp  --  anywhere             239.255.255.250      udp dpt:1900 
ufw-user-input  all  --  anywhere             anywhere             

Chain ufw-before-logging-forward (1 references) 
target     prot opt source               destination          

Chain ufw-before-logging-input (1 references) 
target     prot opt source               destination          

Chain ufw-before-logging-output (1 references) 
target     prot opt source               destination          

Chain ufw-before-output (1 references) 
target     prot opt source               destination          
ACCEPT     all  --  anywhere             anywhere             
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED 
ufw-user-output  all  --  anywhere             anywhere             

Chain ufw-logging-allow (0 references) 
target     prot opt source               destination          
LOG        all  --  anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW ALLOW] " 

Chain ufw-logging-deny (2 references) 
target     prot opt source               destination          
RETURN     all  --  anywhere             anywhere             state INVALID limit: avg 3/min burst 10 
LOG        all  --  anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] " 

Chain ufw-not-local (1 references) 
target     prot opt source               destination          
RETURN     all  --  anywhere             anywhere             ADDRTYPE match dst-type LOCAL 
RETURN     all  --  anywhere             anywhere             ADDRTYPE match dst-type MULTICAST 
RETURN     all  --  anywhere             anywhere             ADDRTYPE match dst-type BROADCAST 
ufw-logging-deny  all  --  anywhere             anywhere             limit: avg 3/min burst 10 
DROP       all  --  anywhere             anywhere             

Chain ufw-reject-forward (1 references) 
target     prot opt source               destination          

Chain ufw-reject-input (1 references) 
target     prot opt source               destination          

Chain ufw-reject-output (1 references) 
target     prot opt source               destination          

Chain ufw-skip-to-policy-forward (0 references) 
target     prot opt source               destination          
DROP       all  --  anywhere             anywhere             

Chain ufw-skip-to-policy-input (7 references) 
target     prot opt source               destination          
DROP       all  --  anywhere             anywhere             

Chain ufw-skip-to-policy-output (0 references) 
target     prot opt source               destination          
DROP       all  --  anywhere             anywhere             

Chain ufw-track-input (1 references) 
target     prot opt source               destination          

Chain ufw-track-output (1 references) 
target     prot opt source               destination          

Chain ufw-user-forward (1 references) 
target     prot opt source               destination          

Chain ufw-user-input (1 references) 
target     prot opt source               destination          

Chain ufw-user-limit (0 references) 
target     prot opt source               destination          
LOG        all  --  anywhere             anywhere             limit: avg 3/min burst 5 LOG level warning prefix "[UFW LIMIT BLOCK] " 
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable 

Chain ufw-user-limit-accept (0 references) 
target     prot opt source               destination          
ACCEPT     all  --  anywhere             anywhere             

Chain ufw-user-logging-forward (0 references) 
target     prot opt source               destination          

Chain ufw-user-logging-input (0 references) 
target     prot opt source               destination          

Chain ufw-user-logging-output (0 references) 
target     prot opt source               destination          

Chain ufw-user-output (1 references) 
target     prot opt source               destination    

nm 工具:

NetworkManager 工具

状态:断开连接

- 设备:wlan0 ----------------------------------------------------------------
  类型:802.11 WiFi
  驱动程序:rt2800usb
  状态:断开连接
  默认值: no
  硬件地址:6C:62:6D:23:D0:C0

  功能:

  无线属性
    WEP 加密:是
    WPA 加密:是
    WPA2 加密:是

  无线接入点  


- 设备:eth0 -----------------------------------------------------------------
  类型:有线
  驱动程序:e1000e
  状态:不可用
  默认值: no
  硬件地址:00:22:4D:50:B3:9E

  功能:
    载波检测:是

  连线属性
    承运商: 关闭

答案1

首先,检查网络管理器是否没有管理您的连接,单击用户名旁边的网络小程序,并确保“启用网络”、“有线”和“无线”都处于活动状态。

此外,似乎没有设置网关,这可能是因为您的 DHCP 配置未被捕获,或者您已手动设置网络配置。如果您设置了网络配置手动的,您应该验证网关是否已填写(您不必使用与我的屏幕截图相同的值,只需查看在使用手动方法时应填写哪些值即可):

在此处输入图片描述

如果你的方法是自动的,然后尝试禁用你的 UFW。

你的 UFW 规则丢弃了大部分软件包,请考虑允许所有输出包,或者至少是需要目标端口的包,从您的问题来看,您需要允许输出到端口 TCP:80 (http) 和输入/输出 UDP:53 (DHCP)。您可以在这篇维基百科文章。如果您不确定,只需完全停用 UFW 规则,检查您是否有互联网。

您可以检查哪些包被删除了dmesg | grep UFW(这可能是一个很长的列表)。

相关内容