probing script v2

9 views
Skip to first unread message

Pablo Piaggio

unread,
Oct 26, 2016, 11:59:15 PM10/26/16
to The HomeFrontRouter Project
Code: https://github.com/HomeFrontRouter/unstable-firewall/tree/master/interfaces

New problem: Moms decides to redecorated. She unplugs the router cables, does her thing, and then just connects the the cables randomly...phone call: son I have no Internet!

The previous version resolved the problem of an 'unknown network setup' by setting up a new /etc/network/interfaces reflecting the current connections. However, this assume no one will mess up with the cables again. If the Ethernet cables are swap after the initial setup, the router loses connectivity.

The new version of the script (setifacesv2.sh) always probes the network, and it sets the interfaces by itself. It uses dhclient  for the interface that had a DHCP offer, and a series of 'ip' commands to set up the LAN interface.

The settings for the LAN interface are now separated on the file lan_settings.sh. Right now, it just returns fix data, but it could be easily set to randomize the 2 bytes of the network segment (see example on commented line).

Best Regards.



Reply all
Reply to author
Forward
0 new messages