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

35 lines
971 B
Bash

#!/bin/bash
set -eu
. ./lib.shs
# typically: bring up the networks
3 weeks ago
ip link set dev lo up
setup_for_router
3 weeks ago
# some random address in the internet :-P
ip link add somewhere type dummy
ip addr add 100.111.0.1/32 dev somewhere
ip addr add 2a01:4f8:c0c:36b8:ffff:f000::1/128 dev somewhere
ip link set somewhere up
# VPS
ip addr add 100.100.0.1/29 dev vps_ve
3 weeks ago
ip addr add fe80:ff01::1/64 dev vps_ve scope link
3 weeks ago
ip link set dev vps_ve up
3 weeks ago
ip route add 2a01:4f8:c0c:36b8:ff01::/80 via fe80:ff01::2 dev vps_ve
# Home ISP
ip addr add 100.64.224.1/30 dev homeisp_ve
ip addr add 2a01:4f8:c0c:36b8:ffe0::1/126 dev homeisp_ve
ip link set dev homeisp_ve up
ip route add 100.64.224.0/20 via 100.64.224.2 dev homeisp_ve
ip route add 2a01:4f8:c0c:36b8:ffe0::/76 via 2a01:4f8:c0c:36b8:ffe0::2 dev homeisp_ve
# Location 1
ip addr add 100.64.254.1/30 dev loc1
ip addr add 2a01:4f8:c0c:36b8:fffe::1/126 dev loc1
ip link set dev loc1 up
# No other routes, IPv4-only and behind NAT anyway…