#!/usr/bin/env bash DESC="Configuration de r2." run() { . common.sh name="r2" startAndWaitSsh $name cat << EOF | setInterfaces r2 # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.2.2 netmask 255.255.255.0 up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1 up route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.2.1 auto eth1 iface eth1 inet static address 192.168.4.1 netmask 255.255.255.0 gateway 192.168.4.2 auto eth2 iface eth2 inet static address 192.168.5.1 netmask 255.255.255.0 up route add -net 192.168.8.0 netmask 255.255.255.0 gw 192.168.5.2 EOF setForwarding r2 vdn-ssh root@r2 systemctl restart networking }