© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
DevHeads IoT Integration ServerDIIS
DevHeads IoT Integration Server•3y ago•
1 reply
nour_oud

Network Configuration of a Raspberry Pi in LAN and WAN

Hi All!

I would like to configure my Raspberry Pi in such a way that:

1. It is accessible (ping, etc.) by a machine B directly connected via Ethernet (local network but without going through a switch/router and without having to modify the configuration of machine B).
2. It always has access to the Internet via USB tethering (from a 4G-enabled phone).

To achieve this, we tried changing the "metric" for wlan0 and eth0 in the routing table, in order to give priority to wlan0 and have it connect to the tethered connection. (Note that we conducted the tests with a Wi-Fi connection rather than USB tethering).

However, we are unable to test if this configuration works because we cannot connect to the RPI via Ethernet due to the fact that the RPI's IP address on the local network (Machine B-RPI) is unknown to us. We attempted to fix it by modifying the dhcpcd.conf file, but without success; we are unable to ping the RPI via Ethernet.

I would like to know if there is another solution to access the RPI via Ethernet (locally) while having it connected to 4G. Or do we necessarily need a router/switch to achieve this?
293d2502d500186af8dcd50d6b9d339e4c570b3e.jpeg
6120PfrjBqL.jpg
DevHeads IoT Integration Server banner
DevHeads IoT Integration ServerJoin
The DevHeads IoT Integration Server accelerates technology engineering by helping pro devs learn, share and collaborate.
2,984Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Need help with Raspberry Pi Camera
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / 🟩-pcb-and-analog
3y ago
How to Interface a 4-Wire Vacuum Suction Motor from a Vacuum Robot with a Raspberry Pi?
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / 🟩-pcb-and-analog
2y ago
Human following robot with raspberry pi 4 and H BRIDGE L293D and 2 ultrasound sensors HC-SR05
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / 🟩-pcb-and-analog
2y ago
facing some problems setting up BLE configuration
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / 🟩-pcb-and-analog
3y ago