So this is a case where I did something for a project I was working on and thought others might benefit as well. The idea is simple, create a program that starts a running packet dump (rolling) looking for ARP packets (the ones with the IP and MAC address associations). The program adds or subtracts one from the IP address captured and sets your IP to this automatically. Now you can talk. The program saves the other computer's IP to your /etc/hosts file so you can talk to him using an alias that is always valid. That way scripts and such can use the alias and always find the computer regardless of how that computer's IP changes. ARP's are generated when link states change (ethernet cable connected/disconnected), when the IP address changes, or when a targeted or gratuitous arp request is issued (arping). If you leave the program running it will change your IP and the /etc/hosts alias in realtime if the IP address of the computer you are connected to changes for some reason.
I used this on embedded systems (Beaglebone Black, and Raspberry Pi) so when they find themselves connected to a computer (or potentially a network switch) they can automatically configure themselves without the NIC they are connected to generating any traffic originating from layer 7 (no applications using the NIC, otherwise you could just use the source IP of any packet).
The embedded systems connect automatically to a VPN via a second interface, a USB CMDA wireless modem. The traffic from the physical NIC is sent via a bridged VPN back to a VPN concentrator. Once the connection is established the connection appears to each endpoint as nothing more that an ethernet cable. This allows me to use non-routable protocols over cellphone networks using standard USB CDMA modems and a $50/month consumer prepaid data plan. If I have 2 or more of these dialing into the same VPN concentrator I can selectively allow them to pass traffic between the endpoints (controlled at/by the concentrator).
I made an example c++ file that shows how to do the auto IP stuff if you run Linux. It's not great (it's total shit code) but it conveys the functional idea.
https://github.com/TaoHawaii/EasyIP
I used this on embedded systems (Beaglebone Black, and Raspberry Pi) so when they find themselves connected to a computer (or potentially a network switch) they can automatically configure themselves without the NIC they are connected to generating any traffic originating from layer 7 (no applications using the NIC, otherwise you could just use the source IP of any packet).
The embedded systems connect automatically to a VPN via a second interface, a USB CMDA wireless modem. The traffic from the physical NIC is sent via a bridged VPN back to a VPN concentrator. Once the connection is established the connection appears to each endpoint as nothing more that an ethernet cable. This allows me to use non-routable protocols over cellphone networks using standard USB CDMA modems and a $50/month consumer prepaid data plan. If I have 2 or more of these dialing into the same VPN concentrator I can selectively allow them to pass traffic between the endpoints (controlled at/by the concentrator).
I made an example c++ file that shows how to do the auto IP stuff if you run Linux. It's not great (it's total shit code) but it conveys the functional idea.
https://github.com/TaoHawaii/EasyIP
Comment