You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
794 B

#!/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
}