#!/usr/bin/bash GATEWAY=130.235.83.152 DEVICE=$1 for i in {65..68} ; do SUBNET="192.168.$i.0/24" ip route add $SUBNET via $GATEWAY dev $DEVICE done