Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I installed debain on an old PC, the KDE version. I have internet over wired. I can connect to my router, I and can ping it over wifi - ping 192.168.1.1 is successful. I can ssh into other machines, connected to the same network. I cannot access external web sites via wifi though, cannot ping successfully any ip, too i.e ping 8.8.8.8 results in a timeout.

Here are

root@debian:/home/deckoff# ifconfig

eth0  Link encap:Ethernet  HWaddr 00:0a:e4:2d:4a:a0  
      inet addr:192.168.1.124  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::20a:e4ff:fe2d:4aa0/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:1419 errors:0 dropped:0 overruns:0 frame:0
      TX packets:759 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:563318 (550.1 KiB)  TX bytes:179940 (175.7 KiB)

eth1  Link encap:Ethernet  HWaddr 00:0e:35:b4:04:64  
      inet addr:192.168.1.123  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::20e:35ff:feb4:464/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:944 errors:1 dropped:1 overruns:0 frame:0
      TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:137654 (134.4 KiB)  TX bytes:8203 (8.0 KiB)
      Interrupt:21 Base address:0x8000 Memory:d0220000-d0220fff 

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:120 errors:0 dropped:0 overruns:0 frame:0
      TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:9264 (9.0 KiB)  TX bytes:9264 (9.0 KiB)

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 interface
auto lo
iface lo inet loopback

root@debian:/home/deckoff# route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

root@debian:/home/deckoff# traceroute 8.8.8.8

traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
 1  192.168.1.1 (192.168.1.1)  5.144 ms  8.733 ms  10.349 ms
 2  * * *
 3  * * *

27  * * *
28  * * *
29  * * *
30  * * *

The adapter is eth1. It uses the ipw2200-bss.fw firmware, which I installed during system installation ,if this info is of any help for solving my problem.

Yes, the name of the interface is eth1, an it's been that way on every linux distro I installed on this PC?!?!?

share|improve this question
    
I probably deleted by accident one of the answers, is this possible?!?!? Weird day today! –  deckoff Dec 22 '13 at 19:03
add comment

2 Answers 2

up vote 2 down vote accepted

Your settings are correct: all your external packets are being routed to the gateway. So there are only two things that can go wrong: either your firewall is blocking external connections, or the gateway is configured in such a way as not to let you connect to outside sites.

Run iptables -nvL; iptables -nvL -t nat; iptables -nvL -t mangle as root to list your firewall settings. Check if you aren't rejecting certain outgoing or incoming packets that you shouldn't be rejecting.

If the gateway (your router) is the culprit, how to solve the problem depends entirely on what it is. Check that it's configured to allow NAT. Most home routers are set up properly by default.

There is something weird in your configuration: the IP address for eth0 is in the address range for the eth1 link. This isn't directly the cause of your problem, but it could cause trouble at some point, and it might indirectly be the reason for bad firewall settings if that turns out to be the problem.

share|improve this answer
    
The router was blocking out this PC by MAC address. I am the only one round here who could have done it, this must have been done a long time ago for a forgotten reason (I use seldom this PC very rarely, for testing only). Sorry –  deckoff Dec 27 '13 at 18:22
add comment

Hm, first of all, I don't understand, why would wifi interface be known as eth1, not wlan1.

Now, seems that your /etc/network/interfaces (I assume etc/nano/interfaces is a typo error) doesn't contain any settings at all. So you should either configure wifi using /etc/network/interfaces or use other tools, such as NetworkManager to configure wifi.

I'd prefer NetworkManager, but if you're strong in spirit, try configuring /etc/network/interfaces with something like:

allow-hotplug wlan1
iface wlan1 inet static
   wpa-ssid <Your SSID>
   wpa-psk <wpa_passphrase ADSL_Wireless password>
   #OR, ALTERNATIVELY TO wpa-psk, YOU COULD USE:
   # wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
   #AND HAVE A wpa_supplicant.conf AS WILL BE SHOWN BELOW
   address 192.168.1.2
   netmask 255.255.255.0
   broadcast 192.168.1.255
   gateway 192.168.1.1
   dns-nameservers <Your dns-server IP>

If you prefer wpa-conf to wpa-psk, your wpa_supplicant.conf should look like:

network={
    ssid="<Your SSID>"
    scan_ssid=1
    key-mgmt=WPA-PSK
    psk=s1b4950bfja....... #A LONG STRING, WHICH IS THE HASH OF YOUR WIRELESS ACCESS POINT KEY
}

Obviously, /etc/wpa_supplicant/wpa_supplicant.conf shouldn't be readable by anyone, except by root, because you don't want to show anyone your password hash. To generate that hash, use wpa_passphrase YOUR-SSID PASSWORD command.

share|improve this answer
    
I updated my question –  deckoff Dec 22 '13 at 20:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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