1

I have an RPi that is NOT connected to the internet and has some data.

This RPi has WiFi and I want some devices to connect to it via WiFi to access some data.

I have achieved this already, here's my network/interfaces file

auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp 

And my dhcpd.conf file looks like

subnet 192.168.42.0 netmask 255.255.255.0 { range 192.168.42.10 192.168.42.50; option broadcast-address 192.168.42.255; option routers 192.168.42.1; default-lease-time 600; max-lease-time 7200; option domain-name "local"; option domain-name-servers 8.8.8.8, 8.8.4.4; } 

What I'm trying to do now is allow devices to connect to this WiFi network but at the same time connect to the internet via 3G/4G. I'm mainly focusing on iOS at the moment.

I've seen some networks on trains, bars... that do this on an iPhone the network shows the message No internet connection. This allows me to connect to the network and at the same time use my cellular data. Looking at the WiFi settings I see that instead of the DHCP tab, the Static tab is selected and only with the IP address and the Subnet Mask.

So the question is, is there a setting on dhcpd.conf, network/interfaces... that would allow me to achieve this?

1 Answer 1

5

Your dhcpd.conf has this option routers 192.168.42.1 line. In human language that line tells to the clients:

If you need to reach computers outside of the 192.168.42.X network, simply send your IP packets to this address and it will route them to destination.

Removing this option should prevent the clients from trying to reach the Internet via your RPi and use whatever alternative connection they have available.

2
  • 1
    I'd also remove option domain-name-servers 8.8.8.8, 8.8.4.4; as I believe it will attempt to use these for a lookup, but have no way of getting to them (as you will have removed the option routers) so will fail, but it may take time... Commented Sep 22, 2016 at 12:14
  • 1
    Removing them won't harm of course. I'd expect this option to simply be ignored since without routers there's no way to reach those addresses anyway. Commented Sep 22, 2016 at 12:15

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.