Raspberry as Accesspoint for isolated IoT network

468 Views Asked by At

I want to use a Rasperry for a very special use case: I have one IoT device, which is not and should not connected to my normal network. That device (an energy meter) should have a fixed IP and connected via ethernet to the Raspi. The Raspi provides an AP with a special SSID. I connect my Phone/Laptop only to it, when needed. WIFI client needs to get an IP via DHCP from Raspi.

I tried that setup yesterday with RaspAP, but was not successful. I was able to connect to the Raspbi via Wifi, but never to the IoT device.

All examples i found have been for Accesspoint mode with an external router or bridge mode with an external DHCP server.

Something I never understood as well: can I have the same IP range on eth0 and wlan? Something like that:

IoT Device  -------------------- Raspi ------------------------- Client
================  ------------ ==================== ---------- ====================
IP: 192.168.2.3 :: => eth <= ::eth-IP: 192.168.2.1              192.168.2.100-200 
static                         wlan-IP: 192.168.2.2 => WIFI <= ::DHCP-Client
================  ------------ ==================== ---------- ====================
1

There are 1 best solutions below

0
Marlab On

What about setup of regular AP with hostapd and dnsmasq, just without enabling local IPv4 forwarding in /etc/sysctl.conf (or setting net.ipv4.ip_forward=0)?