1

I am running Debian Linux on an embedded system. It has an ethernet port and it also uses 3G USB modem. Wvdial and pppd are used and I have pppd configured to make the interface (ppp0) the default route when it comes up.

In the field these systems only use the modem but I like to login over ethernet (SSH) to monitor things while testing on the bench. In particular I'm trying to test the situation where the modem loses its carrier. In this case PPPD eventually fails and the ppp0 interface is removed. My LAN then becomes the default route allowing my software to behave normally. But I don't want my software to know about that LAN.

Is the thing to do to create a static route only for things destined for my LAN such that when the ppp0 interface disappears it will fail when trying to access our servers? Other suggestions?

Thanks.

1

If you do not deploy the device with the LAN interface, I suggest you remove the interface from any sort of management that you device offers for DHCP or routing or such. Then connect the device Ethernet directly to your workstation via a dedicated interface, and static provision both ends with no gateways. Then the device should act much like it does in the field. And you will still have SSH access.

| improve this answer | |
  • I like this answer because it has a good product development angle--avoid mixing in test configuration cruft with the product software. In my situation however I need ethernet for manufacturing. There was a simple solution which was to define the ethernet interface statically rather than use DHCP (which would advertise a gateway to the rest of the world). The routing table has no default in this case and when PPP kicks in it creates a default through its link. My ethernet interface can still be used to route my SSH packets back to me though the LAN. – Kenny Mar 29 '17 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.