I am using a private hotspot to connect a Raspberry Py to internet. I've setup the password and the ssid in the /etc/network/interfaces
file. With this configuration I'm able to connect to the wifi but I can't connect to internet.
pi@tenzo /etc $ ping google.com
PING google.com (173.194.40.2) 56(84) bytes of data.
From tenzo.local (192.168.1.115) icmp_seq=1 Destination Host Unreachable
I've asked around and they said it's a gateway issue. Running traceroute
from a laptop connected to the same network I get:
userk@dopamine:~$ traceroute google.com
traceroute to google.com (216.58.212.110), 30 hops max, 60 byte packets
1 192.168.43.1 (192.168.43.1) 2.423 ms 5.088 ms 5.084 ms
2 * * *
3 10.4.129.165 (10.4.129.165) 120.018 ms 120.027 ms 120.020 ms
4 10.4.129.196 (10.4.129.196) 129.488 ms 129.490 ms 129.471 ms
5 10.4.129.196 (10.4.129.196) 138.994 ms 141.969 ms 144.439 ms
Do you have any advice?
EDIT 1
I've added to the interfaces
the gateway, address and netmask. SEE EDIT 2
Now, when I ping google.com I get the same error as before...
This is the output of route -n
pi@tenzo ~ $ 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 eth0
0.0.0.0 192.168.43.1 0.0.0.0 UG 303 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.43.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0
EDIT 2 This is my interfaces file:
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.115
netmask 255.255.255.0
gateway 192.168.1.1
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.43.235
netmask 255.255.255.0
gateway 192.168.43.1
wpa-ssid "UserKOnTheNet"
wpa-psk "xxxxx"
This is the output of traceroute
pi@tenzo ~ $ traceroute google.com
traceroute to google.com (173.194.40.7), 30 hops max, 60 byte packets
1 tenzo.local (192.168.1.115) 2995.172 ms !H 2995.058 ms !H 2995.016 ms !H