Networking – Access Web App on Linux Server from Laptop via Network Bridge Without Router

bridgeipnetworkingubuntu 18.04webserver

I have a web app on an Ubuntu 18.04 Linux web server, and I simply want to access it from a web browser on my laptop, which is connected to the server directly via ethernet cable.

I can do this if both computers have static IP addresses on the same network (eg 192.168.0.1 and 192.168.0.2 with subnet mask 255.255.255.0). However, the client computer is always changing so setting up a static IP is too much work for my customers.

Can I accomplish the same thing with a network bridge or something like that, so that the client laptop does not need a static IP address?

Background: The server is actually an IoT gateway, and the web app is an admin console for setting the cellular modem APN on the gateway. I want to connect the laptop via ethernet directly to the server gateway, type a static IP address into the laptop's browser, and set the cellular APN via the convenient web app.

Thanks!!

EDIT: Here is a very similar question I previously asked. This new question is specifically about network bridges or other alternatives to having two static IP addresses:
Access web app on Linux server from laptop via ethernet cable, no router

Best Answer

As @dirkt already mentioned, you MUST have a DHCP server in Linux machine (fairly easy to setup) if you want the connecting laptop to get an automatic IP address. As an advanced setup, you can setup the laptop's network card to accept DHCP as primary, and have alternatively a static IP, but I don't think that solves your problem since you will have to do this setup to every connecting laptop, right?

Related Question