One Raspberry Pi with Raspbian (distribution based on Debian), with one enthernet interface
One laptop with windows, with one ethernet interface
One USB modem
Ethernet cable between Pi and laptop
I want to:
Share internet on Raspberry Pi when modem is connected to Pi
Use internet which is shared on laptop when modem is connected to laptop.
What I have done:
My modem is working on both machines, its ppp0 interface on Pi. ppp0 has dynamic IP.
Sharing internet from laptop to Raspberry works. Laptop IP: 192.168.137.1
How can I share internet on Raspberry Pi without ruining too much / reconfiguring network on both machines when I switch modem from one machine to another?
Extra question: I know that interfaces on both windows and linux can have multiple IP addresses. Can I have both configurations set and just plug my modem here and there and start connection to have internet on second machine?