Is it possible to daisy chain the ethernet connection between pi's
Internet/ethernet in to pi #1 then share this internet connection with pi #2 via usb to ethernet adapter? or otherwise?
Assuming your internet conection is with the WiFi interface Assuming you're running a good distro for the Pi like Ubuntu 16.04 or Raspbian.
You can install a firewall like [preferred] Shorewall Firewall. It uses configuration files that are then compiled and a set of iptables commands are created and inserted into a bash script that runs the firewall with masquerading. This way your internal LAN network masquerades behind your external WAN WiFi interface.
I have a basic configuration that uses (4) files: - policy - the basic policy of the firewall, - rules - the rules you create for in/out trafffic, - interfaces - the external interface [WAN], - zones - the zones of the firewall. See https://shorewall.org/
Here are my configuration files for my firewall/router, a Pi 3 B:
$FW net ACCEPT net all DROP NFLOG
all all REJECT NFLOG
Ping(DROP) net $FW DNS(ACCEPT) $FW net SSH(ACCEPT) loc $FW ACCEPT $FW net icmp
# fw firewall net ipv4 loc ipv4
net detect dhcp,tcpflags,logmartians # external loc detect tcpflags,logmartians # internal 100 subnet loc detect tcpflags,logmartians # internal 200 subnet
Yes, it is possible. You can enable
ip forwarding on every raspi so all of them work as router. But then you have to setup different networks for every ethernet connection so you can route packets between the networks, e.g.
rpiA[eth1:192.168.0.1/24] -> rpiB[eth0:192.168.0.2/24 # eth1:192.168.1.1/24] -> rpiC[eth0:192.168.1.2/24]
You can fiddle with the netmask to reduce the size of the different networks.
Better is to use a bridge on every raspi so all of them have the same broadcast domain.