dchristl / esp32_nat_router_extended

a simple ESP32 NAT Router with some additional features
308 stars 60 forks source link

Static Ip address for the ESP32 #115

Open DadaneMC opened 7 months ago

DadaneMC commented 7 months ago

All the options work well, but how can I assign a static IP address to the ESP32 if my router simultaneously has MAC address filtering and IP address filtering?

dchristl commented 7 months ago

Sorry, I don't quite understand the question. There isn't a setting to assign a static IP to the router, and it's usually unnecessary. Any standard router should be able to assign the same IP to a device consistently

DadaneMC commented 7 months ago

My question wasn't very clear, sorry. I wanted to ask how to assign a static IP to my ESP32 when it connects to my router. For example, the gateway of my router is 192.168.1.1, and I want my ESP to have the static IP address 192.168.1.3 when it connects to my WiFi (router). This is because my router doesn't follow the DHCP protocol.

dchristl commented 7 months ago

What do you mean by your router doesn't follow the DHCP protocol? Do you have to assign a static IP address to every device that connects to the router? How do you handle that for IoT devices, that doesn't have such settings? That sounds very strange. What model of router do you have? Even the cheapest routers should be able to handle that. With this project, unfortunately, it's currently not possible, and implementing such functionality would also require some development effort. At the moment, I don't have the time for it, and I have other more pressing matters on my agenda.

DadaneMC commented 7 months ago

I use static IP addressing for added security. I hope this feature is feasible. I completely understand that you're busy at the moment. Thank you for taking the time to respond to me.

dchristl commented 7 months ago

Static IPs don't actually contribute to security; they just ensure that devices are reachable at the same address. This is typically managed by the DHCP server, both at home and in enterprise environments. If you prefer to assign static IPs, simply increase the DHCP lease time for the device and assign a fixed IP. This way, no other device can take that IP. It's all done on the router and can be made more secure by restricting access based on MAC address, for example.