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 address 10.0.0.1 netmask 255.255.255.0 network 10.0.0.0 broadcast 10.0.0.255
listen-address=10.0.0.1 interface=wlan0 domain-needed bogus-priv dhcp-range=10.0.0.50,10.0.0.250,255.255.255.0,1h dhcp-option=option:dns-server, 10.0.0.1 address=/ no-resolv local-ttl=3600
Also, if I ping something, like google.it, it somehow redirect the traffic to the local IP (10.0.0.1), and traceroute confirm this:
pi@raspberry:~ $ ping google.it PING google.it (10.0.0.1) 56(84) bytes of data. 64 bytes from raspberry (10.0.0.1): icmp_seq=1 ttl=64 time=0.420 ms pi@raspberry:~ $ traceroute raspberry.com traceroute to raspberry.com (10.0.0.1), 30 hops max, 60 byte packets 1 raspberry (10.0.0.1) 0.397 ms 0.316 ms 0.306 ms