Using a Raspberry Pi 3, I would like to have a "wifi hotspot" (without internet connection) to connect my computer to it and use some applications (locally). From time to time, I would like to connect the Raspberry to the Internet via an Ethernet cable, to make updates. In short, I want to use both wlan0 and eth0, at the same time, but with different goals.

Currently, I have managed by following this guide to create a local WiFi connection, skipping the routing configuration. I can connect to the Raspberry via wireless from both pc and phone, and use a local webapp.

By connecting the Rasp to the network via an Ethernet cable, the board is connected (ifconfig display the local IP address) and my router also show an active connection with the Raspberry. I can connect to this via SSH but doing anything like apt update doesn't work. I believe it is a DNS problem but I don't know how to fix it. I attach some configuration files below.


auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet static



Also, if I ping something, like google.it, it somehow redirect the traffic to the local IP (, and traceroute confirm this:

pi@raspberry:~ $ ping google.it
PING google.it ( 56(84) bytes of data.
64 bytes from raspberry ( icmp_seq=1 ttl=64 time=0.420 ms

pi@raspberry:~ $ traceroute raspberry.com
traceroute to raspberry.com (, 30 hops max, 60 byte packets
 1  raspberry (  0.397 ms  0.316 ms  0.306 ms
  • There are many tutorials (on this and the Foundation site). Try one of those rather than the obsolete Debian networking. Don't put unnecessary (and incorrect) settings in static address.
    – Milliways
    Apr 18, 2021 at 22:10


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.